lkml.org 
[lkml]   [2021]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Re: Re: Re: [PATCH v1] sched/numa: add per-process numa_balancing
On Tue, Nov 09, 2021 at 06:40:43PM +0800, Gang Li wrote:
> On 11/9/21 5:19 PM, Mel Gorman wrote:
> > On Tue, Nov 09, 2021 at 04:28:28PM +0800, Gang Li wrote:
> > > If the global tuning affects default behaviour and the prctl
> > > affects specific behaviour. Then when prctl specifies
> > > numa_balancing for a process, there is no way for the
> > > global tuning to affect that process.
> >
> > While I think it's very likely that the common case will be to disable
> > NUMA balancing for specific processes,
> > prctl(PR_NUMA_BALANCING,PR_SET_NUMA_BALANCING,1) should still be
> > meaningful.
> >
>
> I'm still a bit confused.
>
> If we really want to enable/disable numa_balancing for all processes, but
> some of them override the global numa_balancing using prctl, what should we
> do?
>
> Do we iterate through these processes to enable/disable them individually?
>

That would be a policy decision on how existing tasks should be tuned
if NUMA balancing is enabled at runtime after being disabled at boot
(or some arbitrary time in the past). Introducing the prctl does mean
that there is a semantic change for the runtime enabling/disabling
of NUMA balancing because previously, enabling global balancing affects
existing tasks and with prctl, it affects only future tasks. It could
be handled in the sysctl to some exist

0. Disable for all but prctl specifications
1. Enable for all tasks unless disabled by prctl
2. Ignore all existing tasks, enable for future tasks

While this is more legwork, it makes more sense as an interface than
prctl(PR_NUMA_BALANCING,PR_SET_NUMA_BALANCING,1) failing if global
NUMA balancing is disabled.

--
Mel Gorman
SUSE Labs

\
 
 \ /
  Last update: 2021-11-09 13:12    [W:0.601 / U:1.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site