summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorJohn Ogness <john.ogness@linutronix.de>2022-11-16 19:21:27 +0300
committerPetr Mladek <pmladek@suse.com>2022-12-02 13:25:00 +0300
commitfc956ae0de7fa25f99114609f21b76e7d38dc25c (patch)
tree9b87bb79f45244d81f8b709086bba87f04132fd3 /tools/perf/scripts/python/export-to-postgresql.py
parentb8ef04be6e1935748ef98af98d81b0744cf225d0 (diff)
downloadlinux-fc956ae0de7fa25f99114609f21b76e7d38dc25c.tar.xz
printk: console_flush_all: use srcu console list iterator
Guarantee safe iteration of the console list by using SRCU. Note that in the case of a handover, the SRCU read lock is also released. This is documented in the function description and as comments in the code. It is a bit tricky, but this preserves the lockdep lock ordering for the context handing over the console_lock: console_lock() | mutex_acquire(&console_lock_dep_map) <-- console lock | console_unlock() | console_flush_all() | | srcu_read_lock(&console_srcu) <-- srcu lock | | console_emit_next_record() | | | console_lock_spinning_disable_and_check() | | | | srcu_read_unlock(&console_srcu) <-- srcu unlock | | | | mutex_release(&console_lock_dep_map) <-- console unlock Signed-off-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Petr Mladek <pmladek@suse.com> Signed-off-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20221116162152.193147-16-john.ogness@linutronix.de
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions