Re: [PATCH 16/19] sched/numa: Detect if node actively handling migration

Rik van Riel
2018-06-04T20:05:58Z

[-- Attachment #1: Type: text/plain, Size: 1045 bytes --]

On Mon, 2018-06-04 at 15:30 +0530, Srikar Dronamraju wrote:

> @@ -1554,6 +1562,9 @@ static void task_numa_compare(struct
> task_numa_env *env,
> if (READ_ONCE(dst_rq->numa_migrate_on))
> return;
>
> + if (*move && READ_ONCE(pgdat->active_node_migrate))
> + *move = false;

Why not do this check in task_numa_find_cpu?

That way you won't have to pass this in as a
pointer, and you also will not have to recalculate
NODE_DATA(cpu_to_node(env->dst_cpu)) for every CPU.

> /*
> + * If the numa importance is less than SMALLIMP,

^^^ numa improvement

> + * task migration might only result in ping pong
> + * of tasks and also hurt performance due to cache
> + * misses.
> + */
> + if (imp < SMALLIMP || imp <= env->best_imp + SMALLIMP / 2)
> + goto unlock;

I can see a use for the first test, but why limit the
search for the best score once you are past the
threshold?

I don't understand the use for that second test.

What workload benefits from it?

--
All Rights Reversed.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]