Re: [PATCH 08/17] sched_ext: Block proxy donors across scheduler transitions
Andrea Righi <[email protected]>
| Newsgroups | dev.linux.lists.sched-ext,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <aoI0ZGIqYmc0iI0Q@gpd4> |
Hi Tejun, On Sun, Aug 16, 2026 at 11:32:20AM -1000, Tejun Heo wrote: > Hello, > > On Sun, Aug 16, 2026 at 07:35:06PM +0200, Andrea Righi wrote: > > @@ -11295,6 +11295,15 @@ sched_change_begin(struct task_struct *p, const struct sched_class *next_class, > > flags |= DEQUEUE_NOCLOCK; > > } > > > > + /* > > + * Don't carry retained proxy state across scheduling class changes. > > + * Compatible RT/DL PI transitions could preserve the session so that a > > + * boosted donor continues proxy-executing its lock owner. Defining which > > + * class transitions can safely retain that state is left for future work. > > + */ > > + if ((flags & DEQUEUE_CLASS) && next_class != p->sched_class) > > + sched_proxy_block_task(rq, p); > > + > > I suppose this prevents RT PI propagation through existing proxy execution > chain regardless of sched class in use? That sounds pretty convoluted and > overlapping anyway but John does this look okay to you? rt_mutex PI propagation itself still takes place, what this prevents is carrying the boosted scheduling context through an existing proxy chain when the boost changes scheduling class. Same-class RT priority changes are preserved. The reset was intended as a conservative way to avoid carrying retained state into or out of sched_ext, but this also affects fair/RT/DL proxy transitions. Maybe we can narrow the condition to transitions into or out of sched_ext, like: #ifdef CONFIG_SCHED_CLASS_EXT /* * Don't carry retained proxy state into or out of sched_ext. The BPF * scheduler must explicitly admit blocked donors and cannot inherit a * proxy session owned by another scheduling class. */ if ((flags & DEQUEUE_CLASS) && (p->sched_class == &ext_sched_class || next_class == &ext_sched_class)) sched_proxy_block_task(rq, p); #endif This would preserve proxy execution across fair/RT/DL PI transitions while still ending it before entering or leaving sched_ext. WDYT? Thanks, -Andrea