Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

sched_ext: Move __SCX_DSQ_ITER_ALL_FLAGS BUILD_BUG_ON to the right place

The BUILD_BUG_ON() which checks that __SCX_DSQ_ITER_ALL_FLAGS doesn't
overlap with the private lnode bits was in scx_task_iter_start() which has
nothing to do with DSQ iteration. Move it to bpf_iter_scx_dsq_new() where it
belongs.

No functional changes.

Signed-off-by: Tejun Heo <tj@kernel.org>

Tejun Heo 023af03c 7900aa69

+2 -3
+2 -3
kernel/sched/ext.c
··· 474 474 */ 475 475 static void scx_task_iter_start(struct scx_task_iter *iter) 476 476 { 477 - BUILD_BUG_ON(__SCX_DSQ_ITER_ALL_FLAGS & 478 - ((1U << __SCX_DSQ_LNODE_PRIV_SHIFT) - 1)); 479 - 480 477 spin_lock_irq(&scx_tasks_lock); 481 478 482 479 iter->cursor = (struct sched_ext_entity){ .flags = SCX_TASK_CURSOR }; ··· 6215 6218 sizeof(struct bpf_iter_scx_dsq)); 6216 6219 BUILD_BUG_ON(__alignof__(struct bpf_iter_scx_dsq_kern) != 6217 6220 __alignof__(struct bpf_iter_scx_dsq)); 6221 + BUILD_BUG_ON(__SCX_DSQ_ITER_ALL_FLAGS & 6222 + ((1U << __SCX_DSQ_LNODE_PRIV_SHIFT) - 1)); 6218 6223 6219 6224 /* 6220 6225 * next() and destroy() will be called regardless of the return value.