From: "Honglei Wang" <jameshongleiwang@126.com>
To: "Honglei Wang" <wanghonglei@didichuxing.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>,
"Daniel Bristot de Oliveira" <bristot@redhat.com>,
linux-kernel@vger.kernel.org, wanghonglei@didichuxing.com
Subject: Re:[PATCH] sched/numa: initialize numa statistics when forking new task
Date: Mon, 17 Jan 2022 23:45:47 +0800 (CST) [thread overview]
Message-ID: <56de780f.71f0.17e68b742c3.Coremail.jameshongleiwang@126.com> (raw)
In-Reply-To: <20220113133920.49900-1-wanghonglei@didichuxing.com>
Hello, friendly ping... any comments about this?
At 2022-01-13 21:39:20, "Honglei Wang" <wanghonglei@didichuxing.com> wrote:
>The child processes will inherit numa_pages_migrated and
>total_numa_faults from the parent. It means even if there is no numa
>fault happen on the child, the statistics in /proc/$pid of the child
>process might show huge amount. This is a bit weird. Let's initialize
>them when do fork.
>
>Signed-off-by: Honglei Wang <wanghonglei@didichuxing.com>
>---
> kernel/sched/fair.c | 2 ++
> 1 file changed, 2 insertions(+)
>
>diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
>index 6e476f6d9435..1aa0ec123a4b 100644
>--- a/kernel/sched/fair.c
>+++ b/kernel/sched/fair.c
>@@ -2826,6 +2826,8 @@ void init_numa_balancing(unsigned long clone_flags, struct task_struct *p)
> /* Protect against double add, see task_tick_numa and task_numa_work */
> p->numa_work.next = &p->numa_work;
> p->numa_faults = NULL;
>+ p->numa_pages_migrated = 0;
>+ p->total_numa_faults = 0;
> RCU_INIT_POINTER(p->numa_group, NULL);
> p->last_task_numa_placement = 0;
> p->last_sum_exec_runtime = 0;
>--
>2.14.1
next prev parent reply other threads:[~2022-01-17 17:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-13 13:39 [PATCH] " Honglei Wang
2022-01-17 15:45 ` Honglei Wang [this message]
2022-01-17 16:18 ` Honglei Wang
2022-01-18 10:39 ` Mel Gorman
2022-01-28 7:40 ` [tip: sched/core] " tip-bot2 for Honglei Wang
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=56de780f.71f0.17e68b742c3.Coremail.jameshongleiwang@126.com \
--to=jameshongleiwang@126.com \
--cc=bristot@redhat.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 \
--cc=wanghonglei@didichuxing.com \
/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®