Re: [PATCH V2 2/3] sched: Fix race in idle_balance()

2014-02-13 Thread Daniel Lezcano
On 02/13/2014 11:10 AM, Preeti U Murthy wrote: Hi, On 02/13/2014 01:15 PM, Alex Shi wrote: On 02/11/2014 07:11 PM, Daniel Lezcano wrote: On 02/10/2014 10:24 AM, Preeti Murthy wrote: HI Daniel, Isn't the only scenario where another cpu can put an idle task on our runqueue, Well, I am not su

Re: [PATCH V2 2/3] sched: Fix race in idle_balance()

2014-02-13 Thread Preeti U Murthy
Hi, On 02/13/2014 01:15 PM, Alex Shi wrote: > On 02/11/2014 07:11 PM, Daniel Lezcano wrote: >> On 02/10/2014 10:24 AM, Preeti Murthy wrote: >>> HI Daniel, >>> >>> Isn't the only scenario where another cpu can put an idle task on >>> our runqueue, >> >> Well, I am not sure to understand what you me

Re: [PATCH V2 2/3] sched: Fix race in idle_balance()

2014-02-12 Thread Alex Shi
On 02/07/2014 07:10 AM, Daniel Lezcano wrote: > The scheduler main function 'schedule()' checks if there are no more tasks > on the runqueue. Then it checks if a task should be pulled in the current > runqueue in idle_balance() assuming it will go to idle otherwise. > > But the idle_balance() rele

Re: [PATCH V2 2/3] sched: Fix race in idle_balance()

2014-02-12 Thread Alex Shi
On 02/11/2014 07:11 PM, Daniel Lezcano wrote: > On 02/10/2014 10:24 AM, Preeti Murthy wrote: >> HI Daniel, >> >> Isn't the only scenario where another cpu can put an idle task on >> our runqueue, > > Well, I am not sure to understand what you meant, but I assume you are > asking if it is possible

Re: [PATCH V2 2/3] sched: Fix race in idle_balance()

2014-02-11 Thread Daniel Lezcano
On 02/10/2014 10:24 AM, Preeti Murthy wrote: HI Daniel, Isn't the only scenario where another cpu can put an idle task on our runqueue, Well, I am not sure to understand what you meant, but I assume you are asking if it is possible to have a task to be pulled when we are idle, right ? This

Re: [PATCH V2 2/3] sched: Fix race in idle_balance()

2014-02-10 Thread Preeti Murthy
HI Daniel, Isn't the only scenario where another cpu can put an idle task on our runqueue, in nohz_idle_balance() where only the cpus in the nohz.idle_cpus_mask are iterated through. But for the case that this patch is addressing, the cpu in question is not yet a part of the nohz.idle_cpus_mask ri

[PATCH V2 2/3] sched: Fix race in idle_balance()

2014-02-06 Thread Daniel Lezcano
The scheduler main function 'schedule()' checks if there are no more tasks on the runqueue. Then it checks if a task should be pulled in the current runqueue in idle_balance() assuming it will go to idle otherwise. But the idle_balance() releases the rq->lock in order to lookup in the sched domain