lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56de780f.71f0.17e68b742c3.Coremail.jameshongleiwang@126.com>
Date:   Mon, 17 Jan 2022 23:45:47 +0800 (CST)
From:   "Honglei Wang" <jameshongleiwang@....com>
To:     "Honglei Wang" <wanghonglei@...ichuxing.com>
Cc:     "Ingo Molnar" <mingo@...hat.com>,
        "Peter Zijlstra" <peterz@...radead.org>,
        "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>,
        "Daniel Bristot de Oliveira" <bristot@...hat.com>,
        linux-kernel@...r.kernel.org, wanghonglei@...ichuxing.com
Subject: Re:[PATCH] sched/numa: initialize numa statistics when forking new
 task

Hello, friendly ping... any comments about this?

At 2022-01-13 21:39:20, "Honglei Wang" <wanghonglei@...ichuxing.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@...ichuxing.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ