[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1528123887.7898.103.camel@surriel.com>
Date: Mon, 04 Jun 2018 10:51:27 -0400
From: Rik van Riel <riel@...riel.com>
To: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Mel Gorman <mgorman@...hsingularity.net>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 02/19] sched/numa: Evaluate move once per node
On Mon, 2018-06-04 at 15:30 +0530, Srikar Dronamraju wrote:
> @@ -1564,97 +1563,73 @@ static void task_numa_compare(struct
> task_numa_env *env,
> if (cur == env->p)
> goto unlock;
>
> + if (!cur) {
> + if (!move || imp <= env->best_imp)
> + goto unlock;
> + else
> + goto assign;
> + }
Just bike shedding, but it may be easier to read
if the "we found our destination" check were written
more explicitly:
if (!cur) {
if (move && imp > env->best_imp)
gote assign;
else
goto unlock;
}
Also, the "move" variable seems to indicate that
the NUMA code may move the task, but not a decision
that moving the task is better than a swap.
Would it make sense to call it "maymove"?
I like how this patch simplifies the code a little.
--
All Rights Reversed.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists