Re: sched_setscheduler() vs idle_balance() race

2015-06-01 Thread Mike Galbraith
On Mon, 2015-06-01 at 10:16 +0200, Peter Zijlstra wrote: > On Fri, May 29, 2015 at 08:30:27PM +0200, Mike Galbraith wrote: > > > It took quite a bit longer than I thought it would, but I finally > > managed to cobble a standalone testcase together that brings nearly > > instant gratification on my

Re: sched_setscheduler() vs idle_balance() race

2015-06-01 Thread Peter Zijlstra
On Sun, May 31, 2015 at 08:39:04AM +0200, Mike Galbraith wrote: > I don't see why we can't just say no in can_migrate_task() if ->pi_lock > is held. I suppose we could do that; what I really want to avoid is also requiring pi_lock for scheduling. The down-side of looking at pi_lock for migration

Re: sched_setscheduler() vs idle_balance() race

2015-06-01 Thread Peter Zijlstra
On Sat, May 30, 2015 at 03:08:26PM +0200, Mike Galbraith wrote: > Seems trying to make the target invisible to balancing created a new > race: dequeue target, do stuff that may drop rq->lock while it's > dequeued, target sneaks into schedule(), dequeues itself (#2), boom. Aw god yes, duh. Fun li

Re: sched_setscheduler() vs idle_balance() race

2015-06-01 Thread Peter Zijlstra
On Fri, May 29, 2015 at 08:48:56PM +0200, Mike Galbraith wrote: > > P.S. intel_idle is not all that wonderful on this box. > > - 78.31% [kernel] [k] _raw_spin_lock > >

Re: sched_setscheduler() vs idle_balance() race

2015-06-01 Thread Peter Zijlstra
On Fri, May 29, 2015 at 08:30:27PM +0200, Mike Galbraith wrote: > It took quite a bit longer than I thought it would, but I finally > managed to cobble a standalone testcase together that brings nearly > instant gratification on my 8 socket DL980. Patched kernel explodes, so > first cut ain't qui

Re: sched_setscheduler() vs idle_balance() race

2015-05-30 Thread Mike Galbraith
On Sat, 2015-05-30 at 15:08 +0200, Mike Galbraith wrote: > On Thu, 2015-05-28 at 15:53 +0200, Peter Zijlstra wrote: > > On Thu, May 28, 2015 at 09:43:52AM +0200, Mike Galbraith wrote: > > > Hi Peter, > > > > > > I'm not seeing what prevents pull_task() from yanking a task out from > > > under __sc

Re: sched_setscheduler() vs idle_balance() race

2015-05-30 Thread Mike Galbraith
On Thu, 2015-05-28 at 15:53 +0200, Peter Zijlstra wrote: > On Thu, May 28, 2015 at 09:43:52AM +0200, Mike Galbraith wrote: > > Hi Peter, > > > > I'm not seeing what prevents pull_task() from yanking a task out from > > under __sched_setscheduler(). A box sprinkling smoldering 3.0 kernel > > wreck

Re: sched_setscheduler() vs idle_balance() race

2015-05-29 Thread Mike Galbraith
P.S. intel_idle is not all that wonderful on this box. - 78.31% [kernel] [k] _raw_spin_lock ▒

Re: sched_setscheduler() vs idle_balance() race

2015-05-29 Thread Mike Galbraith
On Thu, 2015-05-28 at 17:24 +0200, Peter Zijlstra wrote: > On Thu, May 28, 2015 at 04:54:26PM +0200, Mike Galbraith wrote: > > > > The below is compile tested only, but it might just work if I didn't > > > miss anything :-) > > > > I'll take it for a spin, and take a peek at the application. > >

Re: sched_setscheduler() vs idle_balance() race

2015-05-28 Thread Kirill Tkhai
В Чт, 28/05/2015 в 15:53 +0200, Peter Zijlstra пишет: On Thu, May 28, 2015 at 09:43:52AM +0200, Mike Galbraith wrote: > > Hi Peter, > > > > I'm not seeing what prevents pull_task() from yanking a task out from > > under __sched_setscheduler(). A box sprinkling smoldering 3.0 kernel > > wreckage a

Re: sched_setscheduler() vs idle_balance() race

2015-05-28 Thread Peter Zijlstra
On Thu, May 28, 2015 at 04:54:26PM +0200, Mike Galbraith wrote: > > The below is compile tested only, but it might just work if I didn't > > miss anything :-) > > I'll take it for a spin, and take a peek at the application. Thanks! -- To unsubscribe from this list: send the line "unsubscribe lin

Re: sched_setscheduler() vs idle_balance() race

2015-05-28 Thread Mike Galbraith
On Thu, 2015-05-28 at 15:53 +0200, Peter Zijlstra wrote: > Say, how easy can that thing be reproduced? It doesn't seem to take the reporter very long to blow their box up. What they're doing must be pretty darn uncommon though. I have the source to a test application, no destructions to go with

Re: sched_setscheduler() vs idle_balance() race

2015-05-28 Thread Peter Zijlstra
On Thu, May 28, 2015 at 09:43:52AM +0200, Mike Galbraith wrote: > Hi Peter, > > I'm not seeing what prevents pull_task() from yanking a task out from > under __sched_setscheduler(). A box sprinkling smoldering 3.0 kernel > wreckage all over my bugzilla mbox isn't seeing it either ;-) Say, how ea

Re: sched_setscheduler() vs idle_balance() race

2015-05-28 Thread Mike Galbraith
On Thu, 2015-05-28 at 14:06 +0200, Peter Zijlstra wrote: > On Thu, May 28, 2015 at 02:04:21PM +0200, Mike Galbraith wrote: > > On Thu, 2015-05-28 at 13:51 +0200, Peter Zijlstra wrote: > > > > Which is exactly the hole you mean, right? > > > > Yeah, but that hole is way older than dl. Box falling

Re: sched_setscheduler() vs idle_balance() race

2015-05-28 Thread Peter Zijlstra
On Thu, May 28, 2015 at 02:04:21PM +0200, Mike Galbraith wrote: > On Thu, 2015-05-28 at 13:51 +0200, Peter Zijlstra wrote: > > Which is exactly the hole you mean, right? > > Yeah, but that hole is way older than dl. Box falling into it is > running SLE11, which is.. well, still somewhat resemble

Re: sched_setscheduler() vs idle_balance() race

2015-05-28 Thread Mike Galbraith
On Thu, 2015-05-28 at 13:51 +0200, Peter Zijlstra wrote: > On Thu, May 28, 2015 at 09:43:52AM +0200, Mike Galbraith wrote: > > Hi Peter, > > > > I'm not seeing what prevents pull_task() from yanking a task out from > > under __sched_setscheduler(). A box sprinkling smoldering 3.0 kernel > > wreck

Re: sched_setscheduler() vs idle_balance() race

2015-05-28 Thread Peter Zijlstra
On Thu, May 28, 2015 at 09:43:52AM +0200, Mike Galbraith wrote: > Hi Peter, > > I'm not seeing what prevents pull_task() from yanking a task out from > under __sched_setscheduler(). A box sprinkling smoldering 3.0 kernel > wreckage all over my bugzilla mbox isn't seeing it either ;-) > > Scenari