Re: [PATCH 2/4] sched_ext: Make SCX_OPS_ENQ_BLOCKED a hierarchy-wide setting

From: Andrea Righi

Date: Sun Nov 29 2026 - 03:25:38 EST


Hi Tejun,

On Sat, Nov 28, 2026 at 09:46:25PM -1000, Tejun Heo wrote:
> Hello, Andrea.
>
> On Sat, Nov 28, 2026 at 05:39:33PM +0100, Andrea Righi wrote:
> > Right, a sub-sched setting SCX_OPS_ENQ_BLOCKED under a root that doesn't
> > is safe, it would just never see SCX_ENQ_BLOCKED. My concern is that
> > it'd be silent: a sub-sched that opts in and implements donor handling
> > would load fine and that code would never run, with no indication why.
> >
> > Maybe we can accept it and pr_warn() that the flag is ignored?
>
> I don't think we need the warning. On a sub-sched, the flag indicates that
> the sched supports blocked donors. Whether the feature is enabled is
> determined by the root, and I don't think that's all that confusing. The
> state can be exposed through sysfs too.
>
> Imagine how it'd work otherwise. A sched which supports proxy execution
> would have to query the root and then modify its struct_ops before loading,
> and I'm not sure what that buys when this is a simple global state.

Fair enough. Also, the root's flags are already visible from user space
through its struct_ops map (e.g., bpftool struct_ops dump), so a
sub-sched's user-space loader can check whether the root admits blocked
donors and, if it cares, report it, error, or whatever.

Therefore, we don't need pr_warn() and we also don't need to expose
anything new in sysfs.

Thanks,
-Andrea