Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "sched_ext: Use READ_ONCE() for the read side of dsq->nr update"

This reverts commit 9adfcef334bf9c6ef68eaecfca5f45d18614efe0.

dsq->nr is protected by dsq->lock and reading while holding the lock doesn't
constitute a racy read.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: zhidao su <suzhidao@xiaomi.com>

Tejun Heo 80a54b80 28c4ef2b

+2 -6
+2 -6
kernel/sched/ext.c
··· 1296 1296 1297 1297 static void dsq_mod_nr(struct scx_dispatch_q *dsq, s32 delta) 1298 1298 { 1299 - /* 1300 - * scx_bpf_dsq_nr_queued() reads ->nr without locking. Use READ_ONCE() 1301 - * on the read side and WRITE_ONCE() on the write side to properly 1302 - * annotate the concurrent lockless access and avoid KCSAN warnings. 1303 - */ 1304 - WRITE_ONCE(dsq->nr, READ_ONCE(dsq->nr) + delta); 1299 + /* scx_bpf_dsq_nr_queued() reads ->nr without locking, use WRITE_ONCE() */ 1300 + WRITE_ONCE(dsq->nr, dsq->nr + delta); 1305 1301 } 1306 1302 1307 1303 static void refill_task_slice_dfl(struct scx_sched *sch, struct task_struct *p)