Re: [PATCH v2 2/3] sched/dl: Cleanup prio_changed_dl()

From: Juri Lelli
Date: Tue Oct 21 2014 - 12:24:11 EST


Hi Kirill,

On 02/10/14 10:52, Kirill Tkhai wrote:
> Ð ÐÑ, 02/10/2014 Ð 11:36 +0200, Peter Zijlstra ÐÐÑÐÑ:
>> On Wed, Oct 01, 2014 at 01:04:35AM +0400, Kirill Tkhai wrote:
>>> From: Kirill Tkhai <ktkhai@xxxxxxxxxxxxx>
>>>
>>> rq->curr task can't be in "dequeued" state in prio_changed_dl().
>>> (The only place we can have that is __schedule()). So, we delete
>>> rq->curr check.
>>
>> the CBS timer can throttle it right?
>
> Yeah, it's better to check for on_dl_rq():
>
> [PATCH]sched/dl: Cleanup prio_changed_dl()
>
> rq->curr task can't be in "dequeued" state in prio_changed_dl().
> (The only place we can have that is __schedule()). So, we delete
> rq->curr check.
>
> We shouldn't do balancing if deadline task is throttled too.
>
> Also delete "else" branch which is dead code (switched_to_dl()
> is not interested in dequeued tasks and we are not interested
> in balancing in this case).
>

So, I agree that calling switched_to_dl() makes little sense,
but don't we have to deal with updates to not running tasks as
in rt.c? Something like this maybe?