lkml.org 
[lkml]   [2014]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sched: hang in migrate_swap
On 02/24/2014 07:12 AM, Peter Zijlstra wrote:
> Anyway, the below seems to work; it avoids playing tricks with the idle
> thread and instead uses a magic constant.
>
> The comparison should be faster too; seeing how we avoid dereferencing
> p->sched_class.
>
> ---
> Subject: sched: Guarantee task priority in pick_next_task()
> From: Peter Zijlstra<peterz@infradead.org>
> Date: Fri Feb 14 12:25:08 CET 2014
>
> Michael spotted that the idle_balance() push down created a task
> priority problem.
>
> Previously, when we called idle_balance() before pick_next_task() it
> wasn't a problem when -- because of the rq->lock droppage -- an rt/dl
> task slipped in.
>
> Similarly for pre_schedule(), rt pre-schedule could have a dl task
> slip in.
>
> But by pulling it into the pick_next_task() loop, we'll not try a
> higher task priority again.
>
> Cure this by creating a re-start condition in pick_next_task(); and
> triggering this from pick_next_task_{rt,fair}().
>
> Fixes: 38033c37faab ("sched: Push down pre_schedule() and idle_balance()")
> Cc: Juri Lelli<juri.lelli@gmail.com>
> Cc: Ingo Molnar<mingo@kernel.org>
> Cc: Steven Rostedt<rostedt@goodmis.org>
> Reported-by: Michael Wang<wangyun@linux.vnet.ibm.com>
> Signed-off-by: Peter Zijlstra<peterz@infradead.org>

Sign me up to the fan club of this patch, I love it.

After running it for a bit I see that all the hangs I've seen before are gone, even those that I
didn't assume were sched related.


Thanks,
Sasha
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2014-02-24 23:41    [W:0.186 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site