lkml.org 
[lkml]   [2024]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/2] mm/numa_balancing:Allow migrate on protnone reference with MPOL_PREFERRED_MANY policy
On Mon, 11 Mar 2024 09:37:36 +0800 "Huang, Ying" <ying.huang@intel.com> wrote:

> > @@ -2515,15 +2516,26 @@ int mpol_misplaced(struct folio *folio, struct vm_fault *vmf,
> > break;
> >
> > case MPOL_BIND:
> > - /* Optimize placement among multiple nodes via NUMA balancing */
> > + case MPOL_PREFERRED_MANY:
> > + /*
> > + * Even though MPOL_PREFERRED_MANY can allocate pages outside
> > + * policy nodemask we don't allow numa migration to nodes
> > + * outside policy nodemask for now. This is done so that if we
> > + * want demotion to slow memory to happen, before allocating
> > + * from some DRAM node say 'x', we will end up using a
> > + * MPOL_PREFERRED_MANY mask excluding node 'x'. In such scenario
> > + * we should not promote to node 'x' from slow memory node.
> > + */
>
> This is a little hard to digest for me. And, I don't think that we need
> to put this policy choice in code comments. It's better to put it in
> patch description. Where we can give more background, for example, to
> avoid cross-socket traffic, etc.

Oh. I like the comment. We could perhaps put additional detail in the
changelog, but using changelogs to understand the code is so darned
inconvenient.

\
 
 \ /
  Last update: 2024-03-13 16:51    [W:0.050 / U:0.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site