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: Drop "ops" from SCX_OPS_TASK_ITER_BATCH

The tag "ops" is used for two different purposes. First, to indicate that
the entity is directly related to the operations such as flags carried in
sched_ext_ops. Second, to indicate that the entity applies to something
global such as enable or bypass states. The second usage is historical and
causes confusion rather than clarifying anything. For example,
scx_ops_enable_state enums are named SCX_OPS_* and thus conflict with
scx_ops_flags. Let's drop the second usages.

Drop "ops" from SCX_OPS_TASK_ITER_BATCH.

Signed-off-by: Tejun Heo <tj@kernel.org>
Suggested-and-acked-by: Andrea Righi <arighi@nvidia.com>

+4 -4
+4 -4
kernel/sched/ext.c
··· 26 26 * Iterating all tasks may take a while. Periodically drop 27 27 * scx_tasks_lock to avoid causing e.g. CSD and RCU stalls. 28 28 */ 29 - SCX_OPS_TASK_ITER_BATCH = 32, 29 + SCX_TASK_ITER_BATCH = 32, 30 30 }; 31 31 32 32 enum scx_exit_kind { ··· 1401 1401 * @iter: iterator to walk 1402 1402 * 1403 1403 * Visit the next task. See scx_task_iter_start() for details. Locks are dropped 1404 - * and re-acquired every %SCX_OPS_TASK_ITER_BATCH iterations to avoid causing 1405 - * stalls by holding scx_tasks_lock for too long. 1404 + * and re-acquired every %SCX_TASK_ITER_BATCH iterations to avoid causing stalls 1405 + * by holding scx_tasks_lock for too long. 1406 1406 */ 1407 1407 static struct task_struct *scx_task_iter_next(struct scx_task_iter *iter) 1408 1408 { 1409 1409 struct list_head *cursor = &iter->cursor.tasks_node; 1410 1410 struct sched_ext_entity *pos; 1411 1411 1412 - if (!(++iter->cnt % SCX_OPS_TASK_ITER_BATCH)) { 1412 + if (!(++iter->cnt % SCX_TASK_ITER_BATCH)) { 1413 1413 scx_task_iter_unlock(iter); 1414 1414 cond_resched(); 1415 1415 scx_task_iter_relock(iter);