Re: [PATCH] sched/core: Call wq_worker_tick() for the execution context
From: Peter Zijlstra
Date: Thu Sep 10 2026 - 04:23:19 EST
On Wed, Sep 02, 2026 at 08:21:38AM -1000, Tejun Heo wrote:
> On Wed, Sep 02, 2026 at 11:02:09PM +0800, Hui Su wrote:
> > 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: af0c8b2bf67b ("sched: Split scheduler and execution contexts")
> > Signed-off-by: Hui Su <sh_def@xxxxxxx>
>
> Acked-by: Tejun Heo <tj@xxxxxxxxxx>
>
> Peter, how do you want to route this patch? It can go through either sched
> or wq.
Sorry, seems this got lost in the email deluge :/ I can take it through
sched/urgent.