From: Tejun Heo <tj@kernel.org>
To: Hui Su <sh_def@163.com>
Cc: linux-kernel@vger.kernel.org, mingo@redhat.com,
peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
vschneid@redhat.com, kprateek.nayak@amd.com, jstultz@google.com
Subject: Re: [PATCH] sched/core: Call wq_worker_tick() for the execution context
Date: Wed, 2 Sep 2026 08:21:38 -1000 [thread overview]
Message-ID: <aphpMkGmuOrUByf3@slm.duckdns.org> (raw)
In-Reply-To: <20260902150208.1209922-2-sh_def@163.com>
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@163.com>
Acked-by: Tejun Heo <tj@kernel.org>
Peter, how do you want to route this patch? It can go through either sched
or wq.
Thanks.
--
tejun
prev parent reply other threads:[~2026-09-02 18:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-02 15:02 Hui Su
2026-09-02 18:21 ` Tejun Heo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aphpMkGmuOrUByf3@slm.duckdns.org \
--to=tj@kernel.org \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=jstultz@google.com \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sh_def@163.com \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®