[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <530B8DBC.6020105@oracle.com>
Date: Mon, 24 Feb 2014 13:21:48 -0500
From: Sasha Levin <sasha.levin@...cle.com>
To: Peter Zijlstra <peterz@...radead.org>,
Michael wang <wangyun@...ux.vnet.ibm.com>
CC: Ingo Molnar <mingo@...nel.org>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: 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@...radead.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@...il.com>
> Cc: Ingo Molnar<mingo@...nel.org>
> Cc: Steven Rostedt<rostedt@...dmis.org>
> Reported-by: Michael Wang<wangyun@...ux.vnet.ibm.com>
> Signed-off-by: Peter Zijlstra<peterz@...radead.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
Download attachment "0.txt.gz" of type "application/gzip" (21380 bytes)
Powered by blists - more mailing lists