lkml.org 
[lkml]   [2012]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [BUG] kernel freezes with latest tree
* Peter Zijlstra <peterz@infradead.org> wrote:

> On Wed, 2012-01-11 at 10:04 +0100, Peter Zijlstra wrote:
> > Maybe adding a few more NEED_BREAK bits
> > and making it a counter and overflowing it into ABORT might be good.
> >
> >
>
> I could reproduce and confirm something like the below makes
> the hang go-away. I haven't managed to fully understand why
> we're stuck though because we do release the runqueue locks
> and re-enable IRQs on this lock-break.

Well, what happens if every CPU runs load_balance() and we keep
triggering:

if (loops++ > sysctl_sched_nr_migrate) {
*lb_flags |= LBF_NEED_BREAK;
break;
}

in this case load_balance() will do the retry:

if (lb_flags & LBF_NEED_BREAK) {
lb_flags &= ~LBF_NEED_BREAK;
goto redo;
}

but the retry starts the loop again:

list_for_each_entry_safe(p, n, &busiest_cfs_rq->tasks, se.group_node) {

so nobody is able to make progress: livelock/lockup.

( This also explains why i was unable to see this in my
randomized testing: my tests never extreme enough to trigger
the sysctl_sched_nr_migrate threshold. )

Thanks,

Ingo


\
 
 \ /
  Last update: 2012-01-11 16:59    [W:1.050 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site