mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: 王贇 <yun.wang@linux.alibaba.com>
To: "Michal Koutný" <mkoutny@suse.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	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 v2] sched/numa: advanced per-cgroup numa statistic
Date: Sat, 2 Nov 2019 09:13:42 +0800	[thread overview]
Message-ID: <0b7a20a3-4ff4-6183-c6e1-7c8c37efd0e2@linux.alibaba.com> (raw)
In-Reply-To: <20191101173936.GB16165@blackbody.suse.cz>

Hi, Michal

On 2019/11/2 上午1:39, Michal Koutný wrote:
> Hello Yun.
> 
> On Tue, Oct 29, 2019 at 03:57:20PM +0800, 王贇 <yun.wang@linux.alibaba.com> wrote:
>> +static void update_numa_statistics(struct cfs_rq *cfs_rq)
>> +{
>> +	int idx;
>> +	unsigned long remote = current->numa_faults_locality[3];
>> +	unsigned long local = current->numa_faults_locality[4];
>> +
>> +	cfs_rq->nstat.jiffies++;
> This statistics effectively doubles what
> kernel/sched/cpuacct.c:cpuacct_charge() does (measuring per-cpu time).
> Hence it seems redundant.

Yes, while there is no guarantee the cpu cgroup always binding
with cpuacct in v1, we can't rely on that...

> 
>> +
>> +	if (!remote && !local)
>> +		return;
>> +
>> +	idx = (NR_NL_INTERVAL - 1) * local / (remote + local);
>> +	cfs_rq->nstat.locality[idx]++;
> IIUC, the mechanism numa_faults_locality values, this statistics only
> estimates the access locality based on NUMA balancing samples, i.e.
> there exists more precise source of that information.>
> All in all, I'd concur to Mel's suggestion of external measurement.

Currently I can only find numa balancing who is telling the real story,
at least we know after the PF, task do access the page on that CPU,
although it can't cover all the cases, it still giving good hints :-)

It would be great if we could find more similar indicators, like the
migration failure counter Mel mentioned, which give good hints on
memory policy problems, could be used as external measurement.

Regards,
Michael Wang

> 
> Michal
> 

  reply	other threads:[~2019-11-02  1:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-24  3:08 [PATCH] " 王贇
2019-10-24  3:16 ` 王贇
2019-10-28 13:02 ` Peter Zijlstra
2019-10-29  2:02   ` 王贇
2019-10-29  7:57 ` [PATCH v2] " 王贇
2019-11-01 17:39   ` Michal Koutný
2019-11-02  1:13     ` 王贇 [this message]
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=0b7a20a3-4ff4-6183-c6e1-7c8c37efd0e2@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=mkoutny@suse.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

all inboxes | Powered by JetHome®