Re: [PATCH 2/2] sched: Update runtime of prev task before doing pick_next_task()

bsegall
2015-05-26T17:48:42Z

Kirill Tkhai <ktkhai@odin.com> writes:

> pick_next_task() puts prev rq's task. This may lead to runtime
> expiration and to dequeueing of all scheduling class's tasks
> because of throttling. And the current logic is that put_prev_task()
> must be called in the pick method of next task's class.
>
> This was fixed for RT and DL classes, while fair class have this
> problem. So, instead of doing partial solutions, let's update prev
> task's runtime for all classes in __schedule() and fix the problem
> completelly.
>
> Also, let's freeze the clock during pick_next_task() to be sure
> new expirations of runtime won't happen.
>
> Reported-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
> Reported-by: Mohammed Naser <mnaser@vexxhost.com>
> Signed-off-by: Kirill Tkhai <ktkhai@odin.com>

If this is actually the bug I sent a patch for (and that I was correct
in guessing what the issue /was/, which is not at all certain), this
won't actually eliminate the issue - I couldn't find a race involving
actual updates but did find one with disable/enable.