Re: [PATCH] sched/cputime: Account cgroup fields to the scheduling context

From: Hui Su

Date: Thu Sep 03 2026 - 22:38:50 EST


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