Re: [PATCH 01/19] sched/fair: Add infrastructure for cache-aware load balancing

From: K Prateek Nayak

Date: Mon Oct 27 2025 - 00:47:53 EST


Hello Tim,

On 10/11/2025 11:54 PM, Tim Chen wrote:

[..snip..]

> static s64 update_se(struct rq *rq, struct sched_entity *se)
> {
> u64 now = rq_clock_task(rq);
> @@ -1174,6 +1176,7 @@ static s64 update_se(struct rq *rq, struct sched_entity *se)
>
> trace_sched_stat_runtime(running, delta_exec);
> account_group_exec_runtime(running, delta_exec);
> + account_mm_sched(rq, donor, delta_exec);

Shouldn't we attribute this to "rq->curr"/"running" since that is the
task which is actually running on the CPU (with "rq->curr->mm" being the
one that is being used on CPU) as opposed to the "donor" which is just
providing the vruntime context?

>
> /* cgroup time is always accounted against the donor */
> cgroup_account_cputime(donor, delta_exec);

--
Thanks and Regards,
Prateek