[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2b692012-50b5-20f1-b656-fd72a12c1d1a@linux.alibaba.com>
Date: Tue, 29 Oct 2019 10:02:37 +0800
From: ηθ΄ <yun.wang@...ux.alibaba.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...hat.com>, Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched/numa: advanced per-cgroup numa statistic
On 2019/10/28 δΈε9:02, Peter Zijlstra wrote:
[snip]
>> + tg = task_group(p);
>> + while (tg) {
>> + /* skip account when there are no faults records */
>> + if (idx != -1)
>> + this_cpu_inc(tg->numa_stat->locality[idx]);
>> +
>> + this_cpu_inc(tg->numa_stat->jiffies);
>> +
>> + tg = tg->parent;
>> + }
>> +
>> + rcu_read_unlock();
>> +}
>
> Thing is, we already have a cgroup hierarchy walk in the tick; see
> task_tick_fair().
>
> On top of that, you're walking an entirely different set of pointers,
> instead of cfs_rq, you're walking tg->parent, which pretty much
> guarantees you're adding even more cache misses.
>
> How about you stick those numa_stats in cfs_rq (with cacheline
> alignment) and see if you can frob your update loop into the cgroup walk
> we already do.
Thanks for the reply :-)
The hierarchy walk here you mean is the loop of entity_tick(), correct?
Should working if we introduce the per-cfs_rq numa_stat accounting and
do update there, I'll try to reform the implementation in next version.
Regards,
Michael Wang
>
Powered by blists - more mailing lists