lkml.org 
[lkml]   [2020]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 08/11] sched/numa: Bias swapping tasks based on their preferred node
On Fri, Feb 14, 2020 at 12:12:32PM +0800, Hillf Danton wrote:
> > + if (cur->numa_preferred_nid == env->dst_nid)
> > + imp -= imp / 16;
> > +
> > + /*
> > + * Encourage picking a task that moves to its preferred node.
> > + * This potentially makes imp larger than it's maximum of
> > + * 1998 (see SMALLIMP and task_weight for why) but in this
> > + * case, it does not matter.
> > + */
> > + if (cur->numa_preferred_nid == env->src_nid)
> > + imp += imp / 8;
> > +
> > if (maymove && moveimp > imp && moveimp > env->best_imp) {
> > imp = moveimp;
> > cur = NULL;
> > goto assign;
> > }
> >
> > + /*
> > + * If a swap is required then prefer moving a task to its preferred
> > + * nid over a task that is not moving to a preferred nid.
>
> after checking if imp is above SMALLIMP.
>

It is preferable to move a task to its preferred node over one that
does not even if the improvement is lsss than SMALLIMP. The reasoning is
that NUMA balancing retries moving tasks to their preferred node
periodically and moving "now" reduces the chance of a task having to
retry its move later.

--
Mel Gorman
SUSE Labs

\
 
 \ /
  Last update: 2020-02-14 08:51    [W:0.122 / U:1.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site