diff options
author | NeilBrown <neilb@suse.de> | 2024-09-25 15:31:41 +1000 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2024-10-07 09:28:38 +0200 |
commit | 52d633def56c10fe3e82a2c5d88c3ecb3f4e4852 (patch) | |
tree | 599972d1f266486685dcb75789d1c5eafd7257f5 /tools/perf/scripts/python/task-analyzer.py | |
parent | bf39882edc798279765ca31751f6e679b50b97ef (diff) |
sched: Add test_and_clear_wake_up_bit() and atomic_dec_and_wake_up()
There are common patterns in the kernel of using test_and_clear_bit()
before wake_up_bit(), and atomic_dec_and_test() before wake_up_var().
These combinations don't need extra barriers but sometimes include them
unnecessarily.
To help avoid the unnecessary barriers and to help discourage the
general use of wake_up_bit/var (which is a fragile interface) introduce
two combined functions which implement these patterns.
Also add store_release_wake_up() which supports the task of simply
setting a non-atomic variable and sending a wakeup. This pattern
requires barriers which are often omitted.
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20240925053405.3960701-5-neilb@suse.de
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions