Re: [RFC][PATCH 4/4] sched, numa: Ignore pinned tasks

From: Rik van Riel
Date: Fri May 15 2015 - 15:06:46 EST


On 05/15/2015 11:43 AM, Peter Zijlstra wrote:

> Per cpu (kernel) threads can currently trick the load balancer in
> thinking there's something to do and result in moving perfectly placed
> tasks away.
>
> By virtue of the new do_set_cpus_allowed() we can easily add nr_pinned
> accounting. Which we'll use to change the fbq classification such that
> we make it less likely to pick such tasks for migration.
>
> Note that it is still possible we'll migrate these well placed tasks
> away, further patches could reduce this still.

A few ideas here :)

- Identify whether the current task on a CPU is the one
that would like to migrate, and treat the runqueue as
"movable" instead of "remote" if none of the runnable
but queued tasks want to migrate away.

- Teach can_migrate_task about the fbq types, and have
it enforce NUMA placement when the type is "remote",
and ignore NUMA placement when we know there are no
good tasks to move. This might require another
simplification of migrate_improves/degrades_locality.

> Suggested-by: Rik van Riel <riel@xxxxxxxxxx>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>

Reviewed-by: Rik van Riel <riel@xxxxxxxxxx>

--
All rights reversed
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/