]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
sched_ext: Clarify ops.select_cpu() for single-CPU tasks
authorAndrea Righi <arighi@nvidia.com>
Wed, 23 Oct 2024 11:19:07 +0000 (13:19 +0200)
committerTejun Heo <tj@kernel.org>
Wed, 23 Oct 2024 19:20:09 +0000 (09:20 -1000)
Update ops.select_cpu() documentation to clarify that this method is not
called for tasks that are restricted to run on a single CPU, as these
tasks do not have the option to select a different CPU.

Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/sched/ext.c

index a13a6461a2902ec18b0c1034595833b2efd1bac8..97231a65487f007e6e8aae31c53479af7ce3b800 100644 (file)
@@ -217,6 +217,11 @@ struct sched_ext_ops {
         * is dispatched, the ops.enqueue() callback will be skipped. Finally,
         * if @p is dispatched to SCX_DSQ_LOCAL, it will be dispatched to the
         * local DSQ of whatever CPU is returned by this callback.
+        *
+        * Note that select_cpu() is never called for tasks that can only run
+        * on a single CPU or tasks with migration disabled, as they don't have
+        * the option to select a different CPU. See select_task_rq() for
+        * details.
         */
        s32 (*select_cpu)(struct task_struct *p, s32 prev_cpu, u64 wake_flags);