Re: [RFC v3 2/6] Improve the tracking of active utilisation
From: Peter Zijlstra
Date: Fri Nov 18 2016 - 13:50:08 EST
On Fri, Nov 18, 2016 at 05:06:50PM +0100, luca abeni wrote:
>
> > Also, what happens when hrtimer_try_to_cancel() fails?
>
> This is something I am working on... My original idea was that nothing
> bad happens, because the timer handler will see the task as RUNNING and
> will not decrease the running bw... But this is wrong.
> My new idea is to add a "dl_contending" flag in the scheduling entity,
> that indicates if the running bw has already been subtracted or not.
> With this, the issue should be solved (if anyone sees additional
> issues, or a better solution that does not require an additional flag,
> let me know).
Right. My suggestion would be to make it obvious, use that flag if
that's what it takes. We can always try and be clever later.