mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: 王贇 <yun.wang@linux.alibaba.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched/numa: advanced per-cgroup numa statistic
Date: Tue, 29 Oct 2019 10:02:37 +0800	[thread overview]
Message-ID: <2b692012-50b5-20f1-b656-fd72a12c1d1a@linux.alibaba.com> (raw)
In-Reply-To: <20191028130222.GM4131@hirez.programming.kicks-ass.net>



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

> 

  reply	other threads:[~2019-10-29  2:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-24  3:08 王贇
2019-10-24  3:16 ` 王贇
2019-10-28 13:02 ` Peter Zijlstra
2019-10-29  2:02   ` 王贇 [this message]
2019-10-29  7:57 ` [PATCH v2] " 王贇
2019-11-01 17:39   ` Michal Koutný
2019-11-02  1:13     ` 王贇
2019-10-30  9:55 ` [PATCH] " Mel Gorman
2019-10-31  3:31   ` 王贇
2019-10-31 13:17     ` Mel Gorman
2019-11-01  1:49       ` 王贇
2019-11-01  9:13         ` Mel Gorman
2019-11-01 11:52           ` 王贇
2019-11-01 13:35             ` Mel Gorman
2019-11-02  0:45               ` 王贇

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=2b692012-50b5-20f1-b656-fd72a12c1d1a@linux.alibaba.com \
    --to=yun.wang@linux.alibaba.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    /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

Powered by JetHome