Re: [PATCH v11 32/43] sched/deadline: Start a period for a task requeued onto an rt_mutex
From: Mathieu Desnoyers
Date: Fri Nov 27 2026 - 08:49:34 EST
> Can releasing task->pi_lock here before task->pi_blocked_on is set race
> with sched_setattr() or PI boosting on another CPU?
Yes. v12 will also call dl_proxy_block() in task_blocks_on_rt_mutex(),
under the pi_lock of the task, for a task that is not current.
> Does the uncontended FUTEX_CMP_REQUEUE_PI fast path in
> futex_proxy_trylock_atomic() also need to call dl_proxy_block() on the
> new owner?
No. From patch 38 on, dl_waiter_boosts() decides the boost. Until the
new owner wakes up, it compares the waiter with now + dl_deadline if
the owner's deadline is 0 or has passed. That is the deadline the
owner's wakeup gives it. What remains is an owner whose deadline is
ahead, but whose runtime would overflow it at the wakeup. It can miss
a boost, as on v7.4-rc2.
> When a boosted sleeping task has dl_se->deadline == 0 and
> dl_se->dl_runtime > 0, does replenish_dl_new_period() here record
> own_deadline = 0 via dl_note_donor_refill()?
Yes, as on patch 28. dl_end_held_boost() puts that deadline of 0 back
only in the first dl_period after boot. Later, it starts a period of
the task's own instead. In v12, dl_note_donor_refill() will hold no
boost for a deadline of 0: see my reply on patch 28.
> Should the boosted branch in dl_proxy_block() also check
> dl_entity_overflow(dl_se, rq_clock(rq)) as update_dl_entity() does?
Yes. v12 will add the overflow check to the boosted branch.
Thanks,
Mathieu