Re: [PATCH v4 04/26] sched: Let a task boosted by a deadline waiter change its policy

From: Mathieu Desnoyers

Date: Sun Nov 08 2026 - 10:04:57 EST


On 2026-11-06 21:13, sashiko-bot@xxxxxxxxxx wrote:
> dangling pi_se in __sched_setscheduler() when pi is false

Right. Before this patch, the call failed with EBUSY. Now sysrq-n can
take a boosted task out of the class, and nothing drops its boost. v5
drops it in __setscheduler_dl_pi() when the new priority is not a
deadline one, as rt_mutex_setprio() does.

> unconditional ENQUEUE_REPLENISH in __setscheduler_dl_pi()

A boosted task is not throttled. update_curr_dl_se() replenishes it at
once when its runtime runs out. enqueue_task_dl() lifts its throttle. So
the owner already runs until the unlock, with or without these calls. A
call only starts a new period: the deadline becomes now plus the
waiter's relative deadline. That is never earlier than the deadline it
had, so the owner gains nothing. rt_mutex_setprio() does the same
replenishment on every chain walk that reaches the owner.

Thanks,

Mathieu

--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com