lkml.org 
[lkml]   [2020]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 12/12] sched/numa: Stop an exhastive search if a reasonable swap candidate or idle CPU is found
On Fri, Feb 14, 2020 at 07:47:46PM +0800, Hillf Danton wrote:
> > +
> > + /*
> > + * If a move to idle is allowed because there is capacity or load
> > + * balance improves then stop the search. While a better swap
> > + * candidate may exist, a search is not free.
> > + */
> > + if (maymove && !cur && env->best_cpu >= 0 && idle_cpu(env->best_cpu))
> > + stopsearch = true;
> > +
> > + /*
> > + * If a swap candidate must be identified and the current best task
> > + * moves its preferred node then stop the search.
> > + */
> > + if (!maymove && env->best_task &&
> > + env->best_task->numa_preferred_nid == env->src_nid) {
> > + return true;
>
> Take another look at the lock left behind please.
>

/me slaps self

Thanks

--
Mel Gorman
SUSE Labs

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