Re: [PATCH 07/34] sched_ext: Introduce cgroup sub-sched support

From: Tejun Heo

Date: Fri Feb 27 2026 - 15:04:39 EST


On Fri, Feb 27, 2026 at 09:51:39AM -1000, Tejun Heo wrote:
> On Thu, Feb 26, 2026 at 04:52:38PM +0100, Andrea Righi wrote:
> > On Tue, Feb 24, 2026 at 07:00:42PM -1000, Tejun Heo wrote:
> > ...
> > > +/**
> > > + * scx_is_descendant - Test whether sched is a descendant
> > > + * @sch: sched to test
> > > + * @ancestor: ancestor sched to test against
> > > + *
> > > + * Test whether @sch is a descendant of @ancestor.
> > > + */
> > > +static bool scx_is_descendant(struct scx_sched *sch, struct scx_sched *ancestor)
> > > +{
> > > + if (sch->level < ancestor->level)
> > > + return false;
> > > + return sch->ancestors[ancestor->level] == ancestor;
> > > +}
> >
> > This seems to be used only later (patch 31/34), so it's an unused function
> > for now and may break git bisect. Maybe we should introduce this later?
>
> It's kinda nice to introduce the basic organizational things together but
> yeah the warnings are annoying. I'll move it to the first user.

So, I tried and hate it. The placement is not logical. The bypass being the
first user is incidental and reordering now needs to move independent helper
function together. Unused warnings don't break bisects. I'm just going to
note that the function is used by a later patch in the series.

Thanks.

--
tejun