Re: [PATCH v2 03/10] sched/ext: Add a DL server for sched_ext tasks
From: Joel Fernandes
Date: Thu Jun 12 2025 - 12:54:58 EST
On 6/2/2025 8:23 PM, Tejun Heo wrote:
> On Mon, Jun 02, 2025 at 02:00:59PM -0400, Joel Fernandes wrote:
> ...
>> @@ -2308,6 +2311,15 @@ static void enqueue_task_scx(struct rq *rq, struct task_struct *p, int enq_flags
>> if (enq_flags & SCX_ENQ_WAKEUP)
>> touch_core_sched(rq, p);
>>
>> + if (rq->scx.nr_running == 1) {
>> + /* Account for idle runtime */
>> + if (!rq->nr_running)
>> + dl_server_update_idle_time(rq, rq->curr, &rq->ext_server);
>> +
>> + /* Start dl_server if this is the first task being enqueued */
>> + dl_server_start(&rq->ext_server);
>> + }
> The following patch from Peter isn't upstream yet but SCX probably should do
> something similar. Otherwise, the start/stop overhead can become pretty
> expensive:
>
> https://lore.kernel.org/all/20250520094538.086709102@xxxxxxxxxxxxx/
Right. If it is Ok with you, we can do that after this patchset can be merged,
that way we can use the 'dl_server_idle' addition to 'sched_dl_entity', from
that patch as well.
thanks,
- Joel