Re: [PATCH V7 0/9] SCHED_DEADLINE server infrastructure

From: Daniel Bristot de Oliveira
Date: Fri Jun 21 2024 - 09:43:46 EST


On 6/21/24 15:37, Juri Lelli wrote:
> Hi Daniel,
>
> On 27/05/24 14:06, Daniel Bristot de Oliveira wrote:
>> This is v7 of Peter's SCHED_DEADLINE server infrastructure
>> implementation [1].
>
> I finally managed to give this a go and can report that it works great
> for what I've seen. :)
>
> So, please consider this reply a
>
> Tested-by: Juri Lelli <juri.lelli@xxxxxxxxxx>

Thanks!

>> SCHED_DEADLINE servers can help fixing starvation issues of low priority
>> tasks (e.g., SCHED_OTHER) when higher priority tasks monopolize CPU
>> cycles. Today we have RT Throttling; DEADLINE servers should be able to
>> replace and improve that.
>
> ...
>
>> The problem with DL server only implementation is that FIFO tasks might
>> suffer preemption from NORMAL even when spare CPU cycles are available.
>> In fact, fair deadline server is enqueued right away when NORMAL tasks
>> wake up and they are first scheduled by the server, thus potentially
>> preempting a well behaving FIFO task. This is of course not ideal.
>>
>> We had discussions about it, and one of the possibilities would be
>> using a different scheduling algorithm for this. But IMHO that is
>> an overkill.
>>
>> Juri and I discussed this and though about delaying the server
>> activation for the (period - runtime), thus enabling the server
>> only if the fair scheduler is about to starve. We called it
>> the defer server.
>>
>> The defer the server start to the (absolute deadline - runtime)
>> point in time. This is achieved by starting the dl server throttled,
>> with a next replenishing time set to activate the server at
>> (absolute deadline - runtime).
>>
>> The server is enqueued with the runtime replenished. As the fair
>> scheduler runs without boost, its runtime is consumed. If the
>> fair server has its runtime before the runtime - deadline time,
>> the a new period is set, and the timer armed for the new
>> deadline.
>
> I also wanted to pay particular attention to this part implementing the
> deferred server, but failed to find enough focus time for now. I will
> keep trying. One thing that I wondered though is if this change (and the
> move towards this replacing current RT throttling) would call for a Doc
> update. What do you think?

Yeah, am I planning a v8 for the next week. It has no code changes, just a rebase
and the addition of documentation.

I am not mentioning the RT throttling in the documentation. Instead, I am treating
this as a new feature on its own, which is inline with the comments over the code.

I will add an rv monitor to it, extending the documentation, but I will do it
on another series... once we get this done.

Thoughts?

Peter/Ingo, which branch should I rebase it?

-- Daniel

> Thanks!
> Juri
>