diff options
author | John Ogness <john.ogness@linutronix.de> | 2022-11-16 19:21:24 +0300 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2022-12-02 13:25:00 +0300 |
commit | 100bdef2c198b8dc64df011dc4a2152db913c8ba (patch) | |
tree | 49aa89134c32a85a46b6fb7d38015a12bbb37b38 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 4dc64682ad37abb02c54ca598430ac27de60c21a (diff) | |
download | linux-100bdef2c198b8dc64df011dc4a2152db913c8ba.tar.xz |
console: introduce wrappers to read/write console flags
After switching to SRCU for console list iteration, some readers
will begin readings console->flags as a data race. Locklessly
reading console->flags provides a consistent value because there
is at most one CPU modifying console->flags and that CPU is
using only read-modify-write operations.
Introduce a wrapper for SRCU iterators to read console flags.
Introduce a matching wrapper to write to flags of registered
consoles. Writing to flags of registered consoles is synchronized
by the console_list_lock.
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-13-john.ogness@linutronix.de
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions