You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sched: Add test_and_clear_wake_up_bit() and atomic_dec_and_wake_up()
JIRA: https://issues.redhat.com/browse/RHEL-117497
commit 52d633d
Author: NeilBrown <neilb@suse.de>
Date: Wed Sep 25 15:31:41 2024 +1000
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
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
0 commit comments