Re: [PATCH v4 sched_ext/for-7.3 39/40] tools/sched_ext: scx_qmap - Expand hierarchical sub-scheduling

From: Tejun Heo

Date: Thu Jul 09 2026 - 18:30:33 EST


On Wed, 08 Jul 2026 22:03:52 +0000, sashiko-bot@xxxxxxxxxx wrote:

1. Not reachable in qmap contexts - the cid table is populated for every
possible cpu before a scheduler can run, so scx_bpf_task_cid() never
returns negative once the callbacks fire. The cmask helpers also take
u32 and bounds-check, so even a negative would fail the range test
rather than access memory. No change.

2. Real policy nit - fixed in v5 by masking the highpri target pick with
self_cids. Kernel-side enforcement is copy-down by design (an ancestor
keeps its caps on delegated cids), so exclusivity is the demo's own
policy to enforce.

3. Benign - a stale or zeroed id just makes scx_bpf_sub_dispatch() miss
the hash lookup and return false, a wasted no-op call at worst. v5
reads the id once into a local anyway.

4. Same as the v3 round - self-healing, the fields are re-derived by the
following redistribute() and the clean lock can't wrap the cmask ops
as they call kfuncs:

https://lore.kernel.org/r/d0ae1c17ef35bc81e5a36e4be4ca2f07@xxxxxxxxxx

5. Known tolerated nit - the weight is advisory and self-corrects on the
next pass. v5 adds a comment noting it.

Thanks.

--
tejun