Re: [RFC][PATCH] sched: Kick bandwidth timer immediately on start up

From: Juri Lelli
Date: Fri Feb 19 2016 - 03:25:17 EST


Hi Steve,

On 18/02/16 09:15, Steven Rostedt wrote:
> On Tue, 16 Feb 2016 18:37:46 -0500
> Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>
> >
> > A better solution may be to subtract the bandwidth that the deadline
> > task uses from the rt_runtime, and add it back when its finished. Then
> > there wont be a need for runtime tracking of the time used by deadline
> > tasks.
> >
> > I may play with that solution tomorrow.
> >
>
> OK, so I played with this solution. It's much more complex than I was
> hoping it to be. The main issue is there's no one to one relationship
> with the deadline bandwidth and the rt bandwidth. Each runqueue has its
> own rt ratio, but each root domain that has its own deadline ratio.
> Thus, when you add to the dl ratio, it makes adding that to the rt
> bandwidths that more complex. It's doable, but it will make getting the
> dl_bw right with new root domains harder than it already is, and that
> is currently not working.
>
> My recommendation is to hold off on a better solution till we can find a
> way to merge rt bandwidth with the Constant Bandwidth Server (CBS).
>

I couldn't yet test your change, but it makes sense to me. IIUC, the
work around is only used if an RT task gets enqueued and the rt_period
is not active yet. So, it should fix the over accumulation of rt_time
due to DL and still work for RT, since if a second RT task gets enqueued
when the period is already active it will be eventually throttled when
no more runtime is available.

And yes, we should be able to come up with a better fix once DL will
have groups support. However, since that we'll require some time, I also
think we could work with what you propose for the time being.

Best,

- Juri