* [PATCH sched_ext/for-6.19] sched_ext: Mark racy bitfields to prevent adding fields that can't tolerate races
@ 2025-11-05 22:03 Tejun Heo
2025-11-05 22:44 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Tejun Heo @ 2025-11-05 22:03 UTC (permalink / raw)
To: David Vernet, Andrea Righi, Changwoo Min; +Cc: sched-ext, linux-kernel
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>
---
kernel/sched/ext_internal.h | 4 ++++
1 file changed, 4 insertions(+)
--- 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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH sched_ext/for-6.19] sched_ext: Mark racy bitfields to prevent adding fields that can't tolerate races
2025-11-05 22:03 [PATCH sched_ext/for-6.19] sched_ext: Mark racy bitfields to prevent adding fields that can't tolerate races Tejun Heo
@ 2025-11-05 22:44 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2025-11-05 22:44 UTC (permalink / raw)
To: David Vernet, Andrea Righi, Changwoo Min; +Cc: sched-ext, linux-kernel
Applied to sched_ext/for-6.19.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-11-05 22:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-05 22:03 [PATCH sched_ext/for-6.19] sched_ext: Mark racy bitfields to prevent adding fields that can't tolerate races Tejun Heo
2025-11-05 22:44 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox