From: Tejun Heo <tj@kernel.org>
To: Hui Su <sh_def@163.com>
Cc: 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,
hannes@cmpxchg.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched/cputime: Account cgroup fields to the scheduling context
Date: Thu, 3 Sep 2026 20:27:31 -1000 [thread overview]
Message-ID: <appk0wG9RlWojNLJ@slm.duckdns.org> (raw)
In-Reply-To: <20260904023705.106589-1-sh_def@163.com>
Hello,
On Fri, Sep 04, 2026 at 10:37:05AM +0800, Hui Su wrote:
> You're right that cputime_adjust() reconciles the user/system split
> against the total usage, so my description of this as a user-visible
> cpu.stat inconsistency was too strong.
>
> My patch followed the cgroup accounting behavior introduced by
> aa4f74dfd42b, where cgroup_account_cputime() charges CPU time to the
> donor, and tried to make the tick and vtime cgroup field accounting
> follow the same context.
>
> Following your suggestion, the simpler fix is to make cgroup CPU usage
> follow the execution context as well, matching the per-task and
> thread-group accounting. That would also let me drop the cputime boundary
> and donor lifetime machinery from this patch.
cgroup accounting deviating from task accounting doesn't seem to make sense
to me but I haven't thought too much about proxy execution, so let's hear
what John has to say.
Thanks.
--
tejun
prev parent reply other threads:[~2026-09-04 6:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 11:07 Hui Su
2026-09-03 17:30 ` Tejun Heo
2026-09-04 2:37 ` Hui Su
2026-09-04 6:27 ` 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=appk0wG9RlWojNLJ@slm.duckdns.org \
--to=tj@kernel.org \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=hannes@cmpxchg.org \
--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®