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>] [day] [month] [year] [list]
Date:   Fri, 14 Feb 2020 07:50:45 +0000
From:   Mel Gorman <mgorman@...hsingularity.net>
To:     Hillf Danton <hdanton@...a.com>
Cc:     Vincent Guittot <vincent.guittot@...aro.org>,
        Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Juri Lelli <juri.lelli@...hat.com>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ben Segall <bsegall@...gle.com>,
        Valentin Schneider <valentin.schneider@....com>,
        Phil Auld <pauld@...hat.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ