diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2023-03-16 15:30:27 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2023-04-16 10:00:18 +0300 |
commit | bcb7ee79029dcaeb09668a4d1489de256829a7cc (patch) | |
tree | 6aaa05bb6b1e428283e64921a9012bbab4e8c0ed /tools/perf/scripts/python/export-to-postgresql.py | |
parent | aff69273af61f5d1c8fb401d6f19148d11629b41 (diff) | |
download | linux-bcb7ee79029dcaeb09668a4d1489de256829a7cc.tar.xz |
posix-timers: Prefer delivery of signals to the current thread
POSIX timers using the CLOCK_PROCESS_CPUTIME_ID clock prefer the main
thread of a thread group for signal delivery. However, this has a
significant downside: it requires waking up a potentially idle thread.
Instead, prefer to deliver signals to the current thread (in the same
thread group) if SIGEV_THREAD_ID is not set by the user. This does not
change guaranteed semantics, since POSIX process CPU time timers have
never guaranteed that signal delivery is to a specific thread (without
SIGEV_THREAD_ID set).
The effect is that queueing the signal no longer wakes up potentially idle
threads, and the kernel is no longer biased towards delivering the timer
signal to any particular thread (which better distributes the timer signals
esp. when multiple timers fire concurrently).
Suggested-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20230316123028.2890338-1-elver@google.com
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions