diff options
| author | Tejun Heo <tj@kernel.org> | 2026-05-18 21:53:11 -1000 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-05-20 21:14:46 -1000 |
| commit | f31e89a8f583cb8b1b68002cedb77ce444d6f7d2 (patch) | |
| tree | 6fd83d24aa5bb9314f0a254b583b5c19f6401bee /include/linux | |
| parent | a0b48fd7fe2854211eadb5056e72bce3946140c1 (diff) | |
sched_ext: Add cmask mask ops
Sub-sched cap code and other upcoming consumers need bulk cmask ops, both
mutating (and/or/copy/andnot) and predicate (subset/intersects/empty).
cmask_walk_op2() walks the intersection of two ranges word by word;
cmask_walk_op1() walks one range. Both are __always_inline and dispatched on
a compile-time-constant op enum, so each public entry collapses to a
specialized loop with the inner switch reduced to one arm.
Two-cmask ops only touch bits in the intersection of the two ranges; bits
outside are left unchanged. scx_cmask_or_racy() and scx_cmask_copy_racy()
mirror the locking forms but read @src word-by-word through data_race();
callers handle ordering with concurrent writers themselves.
v2: Add scx_cmask_empty().
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
