Re: [RFC PATCH 3/6] sched/rt: Check to push FIFO current away at each tick

From: Steven Rostedt
Date: Sun Apr 26 2015 - 14:13:23 EST


On Mon, 27 Apr 2015 01:10:55 +0800
Xunlei Pang <xlpang@xxxxxxx> wrote:

> From: Xunlei Pang <pang.xunlei@xxxxxxxxxx>
>
> There may be some non-migratable tasks queued in the "run queue"
> with the same priority as current which is FIFO and migratable,
> so at each tick we can check and try to push current away and
> give these tasks a chance of running(we don't do this for tasks
> queued with lower priority).

Why do we care?

This patch adds overhead to the tick for apparently no benefit. If you
have two tasks of the same priority where one is migrateable and the
other is not, then that's your problem. There's no specification that I
know of that states we need to push the currently running task off to
another CPU just so that we can run a pinned one. What happens if the
other CPU we pushed the rt task to, suddenly gets a pinned task
scheduled there, we end up pushing that rt task again. This is not the
kernel's problem.

The simple solution is to make sure that migratable RT tasks are at
different priorities than pinned RT tasks. There, problem solved.

-- Steve


>
> Signed-off-by: Xunlei Pang <pang.xunlei@xxxxxxxxxx>
--
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/