mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hui Su <sh_def@163.com>
To: tj@kernel.org
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: Fri,  4 Sep 2026 10:37:05 +0800	[thread overview]
Message-ID: <20260904023705.106589-1-sh_def@163.com> (raw)
In-Reply-To: <apmuywWz3c0keI2i@slm.duckdns.org>

Hello Tejun,

Thanks for the review.

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.

Thanks,
Hui


  reply	other threads:[~2026-09-04  2:38 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 [this message]
2026-09-04  6:27     ` Tejun Heo

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=20260904023705.106589-1-sh_def@163.com \
    --to=sh_def@163.com \
    --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=tj@kernel.org \
    --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®