Re: [PATCH v4 sched_ext/for-7.3 29/40] sched_ext: Route task slice writes through set_task_slice()

From: Tejun Heo

Date: Thu Jul 09 2026 - 18:31:58 EST


On Wed, 08 Jul 2026 21:53:32 +0000, sashiko-bot@xxxxxxxxxx wrote:
> This is a pre-existing issue, but does this lockless write to the
> task's slice create a dangerous data race with update_curr_scx()?

The lockless write this race needs no longer exists after this and the
following two patches: scx_bpf_task_set_slice() writes p->scx.slice
directly only when the caller holds the task's current rq lock, and every
other caller is routed through the deferred slice_oob path, drained under
the rq lock at the top of update_curr_scx() before the min_t().

Thanks.

--
tejun