]> www.infradead.org Git - users/willy/xarray.git/commitdiff
sched_ext: Drop "ops" from SCX_OPS_TASK_ITER_BATCH
authorTejun Heo <tj@kernel.org>
Fri, 4 Apr 2025 20:10:30 +0000 (10:10 -1000)
committerTejun Heo <tj@kernel.org>
Fri, 4 Apr 2025 20:10:39 +0000 (10:10 -1000)
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>
kernel/sched/ext.c

index d15b45b3eb715c0357c22ba03b7e5e44161fb73e..6781e6da059b7cc2daf6286b7c1644c2b6d58018 100644 (file)
@@ -26,7 +26,7 @@ enum scx_consts {
         * Iterating all tasks may take a while. Periodically drop
         * scx_tasks_lock to avoid causing e.g. CSD and RCU stalls.
         */
-       SCX_OPS_TASK_ITER_BATCH         = 32,
+       SCX_TASK_ITER_BATCH             = 32,
 };
 
 enum scx_exit_kind {
@@ -1401,15 +1401,15 @@ static void scx_task_iter_stop(struct scx_task_iter *iter)
  * @iter: iterator to walk
  *
  * Visit the next task. See scx_task_iter_start() for details. Locks are dropped
- * and re-acquired every %SCX_OPS_TASK_ITER_BATCH iterations to avoid causing
- * stalls by holding scx_tasks_lock for too long.
+ * and re-acquired every %SCX_TASK_ITER_BATCH iterations to avoid causing stalls
+ * by holding scx_tasks_lock for too long.
  */
 static struct task_struct *scx_task_iter_next(struct scx_task_iter *iter)
 {
        struct list_head *cursor = &iter->cursor.tasks_node;
        struct sched_ext_entity *pos;
 
-       if (!(++iter->cnt % SCX_OPS_TASK_ITER_BATCH)) {
+       if (!(++iter->cnt % SCX_TASK_ITER_BATCH)) {
                scx_task_iter_unlock(iter);
                cond_resched();
                scx_task_iter_relock(iter);