[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <15bbfed1-5b7c-e6ff-07e9-9de3a0ee4728@bytedance.com>
Date: Mon, 13 Dec 2021 14:49:48 +0800
From: Gang Li <ligang.bdlg@...edance.com>
To: Jonathan Corbet <corbet@....net>, 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>
Cc: linux-api@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-doc@...r.kernel.org
Subject: Re: [PATCH v3] sched/numa: add per-process numa_balancing
Hi,
Any comments plz ;)
On 2021/12/6 10:45, Gang Li wrote:
> This patch add a new api PR_NUMA_BALANCING in prctl.
>
> A large number of page faults will cause performance loss when numa
> balancing is performing. Thus those processes which care about worst-case
> performance need numa balancing disabled. Others, on the contrary, allow a
> temporary performance loss in exchange for higher average performance, so
> enable numa balancing is better for them.
>
> Numa balancing can only be controlled globally by
> /proc/sys/kernel/numa_balancing. Due to the above case, we want to
> disable/enable numa_balancing per-process instead.
>
> Add numa_balancing under mm_struct. Then use it in task_tick_fair.
>
> Set per-process numa balancing:
> prctl(PR_NUMA_BALANCING, PR_SET_NUMAB_DISABLE); //disable
> prctl(PR_NUMA_BALANCING, PR_SET_NUMAB_ENABLE); //enable
> prctl(PR_NUMA_BALANCING, PR_SET_NUMAB_DEFAULT); //follow global
> Get numa_balancing state:
> prctl(PR_NUMA_BALANCING, PR_GET_NUMAB, &ret);
> cat /proc/<pid>/status | grep NumaB_enabled
>
> Cc: linux-api@...r.kernel.org
> Signed-off-by: Gang Li <ligang.bdlg@...edance.com>
Powered by blists - more mailing lists