Re: [PATCHSET v2 sched_ext/for-7.2] sched_ext: cmask improvements

From: Andrea Righi

Date: Thu May 21 2026 - 01:53:54 EST


Hi Tejun

On Mon, May 18, 2026 at 09:58:35PM -1000, Tejun Heo wrote:
> Hello,
>
> v2 rolls up the per-patch updates that went out in reply to v1 and
> includes an update from Andrea's review on 2/3.

This one looks good to me.

Reviewed-by: Andrea Righi <arighi@xxxxxxxxxx>

Thanks,
-Andrea

>
> v1: https://lore.kernel.org/r/20260517183614.1191534-1-tj@xxxxxxxxxx
>
> v2:
> - 1/3: Also rename nr_bits in cmask_copy_from_kernel().
> - 2/3: Init scx_set_cmask_scratch. Bounds-check __cmask_init().
> Widen *_CMASK_NR_WORDS() to u64. (Andrea)
> - 3/3: Add scx_cmask_empty().
>
> Three patches for cmask: tidy active-range bookkeeping and add the
> mask-on-mask op helpers the sub-sched series will use.
>
> Not backward-compat with the current scx_cmask layout/API, but cmask
> landed in for-7.2 and hasn't been released; scx_qmap is the only user.
>
> 0001 - sched_ext: Rename scx_cmask.nr_bits to nr_cids
> 0002 - sched_ext: Track bits[] storage size in struct scx_cmask
> 0003 - sched_ext: Add cmask mask ops
>
> Based on sched_ext/for-7.2 (1136fb1213d1).
>
> Git tree: git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git cmask-prep-v2.3
>
> kernel/sched/ext_cid.c | 322 +++++++++++++++++++++++++++++++++-
> kernel/sched/ext_cid.h | 72 +++++++-
> kernel/sched/ext_types.h | 68 +++++--
> tools/sched_ext/include/scx/cid.bpf.h | 144 ++++++++++-----
> 4 files changed, 545 insertions(+), 61 deletions(-)
>
> Thanks.
>
> --
> tejun