Re: [PATCH v4 sched_ext/for-7.3 14/40] sched_ext: Defer scx_sched kobj sysfs add into the enable workfns
From: Tejun Heo
Date: Thu Jul 09 2026 - 18:30:00 EST
On Wed, 08 Jul 2026 21:47:19 +0000, sashiko-bot@xxxxxxxxxx wrote:
> - [Medium] Meaningful code and commit message mismatch: In
> sub-schedulers, scx_sched_sysfs_add() is called before ops.init(),
> contradicting the root scheduler's behavior and the commit message's
> goal.
Intentional asymmetry: the kobj only exposes ops, events and caps, and a
sub's caps come from parent grants at runtime, not from its own
ops.init(). The pshard cmasks that caps reads are allocated and zeroed
before the sysfs add, so a pre-init read shows the truthful "no caps
yet". Root defers past ops.init() because it seeds its own caps there.
No change.
Thanks.
--
tejun