linux/kernel/sched
Hui Su f5741d2b34 sched/core: Call wq_worker_tick() for the execution context
wq_worker_tick() accounts CPU time and detects CPU-intensive work for
the kworker that is actually running. With proxy execution, rq->donor
is the scheduling context while rq->curr is the execution context.

Calling the hook with rq->donor can skip workqueue accounting when a
kworker is executing on behalf of a donor task. It can also account a
blocked kworker when the donor is a worker but rq->curr is the task
actually executing. The former can delay WORKER_CPU_INTENSIVE handling
and pool concurrency management, which can delay pending kernel work
and userspace operations depending on it.

Use rq->curr for the workqueue tick hook while retaining rq->donor for
scheduler accounting.

Fixes: af0c8b2bf6 ("sched: Split scheduler and execution contexts")
Signed-off-by: Hui Su <sh_def@163.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://patch.msgid.link/20260902150208.1209922-2-sh_def@163.com
2026-09-10 10:22:52 +02:00
..
ext treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
autogroup.c
autogroup.h
build_policy.c
build_utility.c
clock.c
completion.c
core_sched.c
core.c sched/core: Call wq_worker_tick() for the execution context 2026-09-10 10:22:52 +02:00
cpuacct.c
cpudeadline.c
cpudeadline.h
cpufreq_schedutil.c
cpufreq.c
cpupri.c
cpupri.h
cputime.c
deadline.c sched/rt,dl: Skip migrate-disabled tasks when picking a push candidate 2026-09-02 09:17:49 +02:00
debug.c
fair.c sched: Account cgroup CPU time to the execution context 2026-09-10 10:22:52 +02:00
features.h
idle.c
isolation.c
loadavg.c
Makefile
membarrier.c
pelt.c
pelt.h
psi.c
rq-offsets.c
rt.c sched/rt,dl: Skip migrate-disabled tasks when picking a push candidate 2026-09-02 09:17:49 +02:00
sched-pelt.h
sched.h
smp.h
stats.c
stats.h
stop_task.c
swait.c
syscalls.c
topology.c
wait_bit.c
wait.c