From: Tejun Heo Date: Wed, 5 Nov 2025 22:03:08 +0000 (-1000) Subject: sched_ext: Mark racy bitfields to prevent adding fields that can't tolerate races X-Git-Tag: v6.19-rc1~177^2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a629ecbcdffacfb04fc4eb0098c0688f38c8b9d;p=thirdparty%2Fkernel%2Flinux.git 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 --- diff --git a/kernel/sched/ext_internal.h b/kernel/sched/ext_internal.h index fb161fc35328c..dd6f25fb6159c 100644 --- a/kernel/sched/ext_internal.h +++ b/kernel/sched/ext_internal.h @@ -895,6 +895,10 @@ struct scx_sched { struct scx_dispatch_q **global_dsqs; struct scx_sched_pcpu __percpu *pcpu; + /* + * Updates to the following warned bitfields can race causing RMW issues + * but it doesn't really matter. + */ bool warned_zero_slice:1; bool warned_deprecated_rq:1;