summaryrefslogtreecommitdiff
path: root/kernel/workqueue.c
diff options
context:
space:
mode:
authorKuba Piecuch <jpiecuch@google.com>2026-09-30 14:23:58 +0000
committerTejun Heo <tj@kernel.org>2026-09-30 07:49:44 -1000
commitaf701b8d3238b9eb7cd450b0491300452c700bf5 (patch)
treed30c35cc37b666b50370173e6eff54878f8cff1a /kernel/workqueue.c
parentd35a535d3e3e71f92a051d94e415f43612c4edfc (diff)
downloadlinux-next-af701b8d3238b9eb7cd450b0491300452c700bf5.tar.gz
linux-next-af701b8d3238b9eb7cd450b0491300452c700bf5.zip
sched_ext: Call ops.dequeue() when a task arrives on a remote local DSQ
When a task in the BPF scheduler's custody is moved to another CPU's local DSQ, ops.dequeue() is only called once the task is picked for execution, from set_next_task_scx() with SCX_DEQ_CORE_SCHED_EXEC, even though no core-sched pick took place. It should instead be called without flags when the task is inserted into the destination DSQ, as it is for same-rq dispatches. move_remote_task_to_local_dsq() sets p->scx.sticky_cpu across the migration so that deactivate_task() on the source rq doesn't end custody. Since commit b75aaea24c9f ("sched_ext: Properly mark SCX-internal migrations via sticky_cpu"), enqueue_task_scx() only clears it after inserting the task, so task_leave_custody() still sees the migration in progress and skips the custody exit. Clear p->scx.sticky_cpu as soon as enqueue_task_scx() has read it, as was done before that commit. The source side is unaffected. Fixes: ebf1ccff79c4 ("sched_ext: Fix ops.dequeue() semantics") Cc: stable@vger.kernel.org # 7.1.x: 18d62044cda7: sched_ext: Preserve rq tracking across local DSQ dispatch Cc: stable@vger.kernel.org # 7.1.x Reviewed-by: Andrea Righi <arighi@nvidia.com> Assisted-by: Claude:claude-opus-5.5 Signed-off-by: Kuba Piecuch <jpiecuch@google.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/workqueue.c')
0 files changed, 0 insertions, 0 deletions