From: Andrea Righi Date: Wed, 23 Oct 2024 11:19:07 +0000 (+0200) Subject: sched_ext: Clarify ops.select_cpu() for single-CPU tasks X-Git-Tag: v6.13-rc1~164^2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b452ae4d20aefe96232440421faed37c9d3410a7;p=thirdparty%2Flinux.git sched_ext: Clarify ops.select_cpu() for single-CPU tasks 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 Signed-off-by: Tejun Heo --- diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index a13a6461a2902..97231a65487f0 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -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);