Re: [BUGFIX][PATCH] Fix sched rt group scheduling when hierachy is enabled

From: Yong Zhang
Date: Fri Mar 04 2011 - 04:31:05 EST


On Fri, Mar 4, 2011 at 4:59 PM, Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx> wrote:
>>>> Âdeactivate_task(b); /* A.throttled == 1 && A.rt_nr_running == 0 */
>>>> Â Âdo_sched_rt_period_timer(); /* A.run_time == 0 && A.throttled == 0*/
>>>
>>> Note at some point rt_time becomes 0 and if enqueue is not set, the
>>
>> If the group should be add back, it will be at the first
>> do_sched_rt_period_timer() which decreases run_time;
>>
>
> As long as idle is 0, the period will continue to run, if it has
> rt_nr_running or rt_time, the timer will run.

Yep.
Should be the first do_sched_rt_period_timer() which meets
rt_rq->rt_time < runtime :)

>
>>> next do_sched_rt_period_timer() is a NOP and does not enqueue back the
>>> group
>>
>> Otherwise it will be added back when a task is attching to it.
>>
>> I still can't see how a unthrottled group which has task attched stay
>> unqueued.
>
> The other way of looking at the first change is
>
> Can we have rt_time as 0, rt_nr_running >=1, rt_throttled !=0 and
> still not have the rt_rq enqueued?

Yeah, the same question. How could we reach that?

IMHO, rt_time == 0 and rt_throttled !=0 can't coexist.

>
> If this is not the case, we don't lose much, a quick check for
> rt_nr_running and on_rt_q

I don't get what you mean here.

Thanks,
Yong


--
Only stand for myself
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/