Skip to content

Commit 5a629ec

Browse files
committed
sched_ext: Mark racy bitfields to prevent adding fields that can't tolerate races
The warned bitfields in struct scx_sched are updated racily from concurrent CPUs causing RMW races, which is fine for these boolean warning flags. Add a comment marking this area to prevent future fields that can't tolerate racy updates from being added here. Signed-off-by: Tejun Heo <tj@kernel.org>
1 parent d723f36 commit 5a629ec

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

kernel/sched/ext_internal.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,10 @@ struct scx_sched {
895895
struct scx_dispatch_q **global_dsqs;
896896
struct scx_sched_pcpu __percpu *pcpu;
897897

898+
/*
899+
* Updates to the following warned bitfields can race causing RMW issues
900+
* but it doesn't really matter.
901+
*/
898902
bool warned_zero_slice:1;
899903
bool warned_deprecated_rq:1;
900904

0 commit comments

Comments
 (0)