Re: [PATCH 07/17] sched_ext: Add topological CPU IDs (cids)

Tejun Heo
2026-04-28T20:10:00Z

Hello, Kuba.

On Tue, Apr 28, 2026 at 01:00:22PM +0000, Kuba Piecuch wrote:
> Hi Tejun,
>
> Relaying a minor finding from Sashiko's review:
> https://sashiko.dev/#/patchset/20260424172721.3458520-1-tj%40kernel.org
>
> Might also be worth having a look at the findings for other patches in the
> series.

I submitted a PR to make it send review emails but that didn't seem to have
worked. If you look into how to make it send review emails, I'd appreciate
it.

> > @@ -6727,6 +6728,16 @@ static void scx_root_enable_workfn(struct kthread_work *work)
> > */
> > cpus_read_lock();
> >
> > + /*
> > + * Build the cid mapping before publishing scx_root. The cid kfuncs
> > + * dereference the cid arrays unconditionally once scx_prog_sched()
> > + * returns non-NULL; the rcu_assign_pointer() below pairs with their
> > + * rcu_dereference() to make the populated arrays visible.
> > + */
> > + ret = scx_cid_init(sch);
> > + if (ret)
> > + goto err_disable;
> > +
>
> Are we missing cpus_read_unlock() on the error path here?

Yeah, fixed this and several other valid ones that sashiko found. Will post
the next round soon.

Thanks.

--
tejun