mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched_ext: Fix several comment issues
@ 2026-08-27  9:14 Wanwu Li
  2026-08-27  9:56 ` Zhan Xusheng
  2026-08-31 16:53 ` Tejun Heo
  0 siblings, 2 replies; 3+ messages in thread
From: Wanwu Li @ 2026-08-27  9:14 UTC (permalink / raw)
  To: Tejun Heo, David Vernet, Andrea Righi, Changwoo Min
  Cc: linux-kernel, sched-ext, Wanwu Li

Fix several comment issues found during review:
__setschduler_prio() -> __setscheduler_class()
scx_iter_scx_dsq_new() -> bpf_iter_scx_dsq_new()
scx_next_task_scx() -> set_next_task_scx()

Signed-off-by: Wanwu Li <liwanwu@kylinos.cn>
---
 kernel/sched/ext/ext.c      | 6 +++---
 kernel/sched/ext/internal.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/sched/ext/ext.c b/kernel/sched/ext/ext.c
index 10af28a9f2c0..5377a8a52ba0 100644
--- a/kernel/sched/ext/ext.c
+++ b/kernel/sched/ext/ext.c
@@ -876,7 +876,7 @@ struct task_struct *scx_task_iter_next_locked(struct scx_task_iter *iter)
 		 * unloading. The init_tasks ("swappers") should be excluded
 		 * from the iteration because:
 		 *
-		 * - It's unsafe to use __setschduler_prio() on an init_task to
+		 * - It's unsafe to use __setscheduler_class() on an init_task to
 		 *   determine the sched_class to use as it won't preserve its
 		 *   idle_sched_class.
 		 *
@@ -5514,7 +5514,7 @@ static const struct kset_uevent_ops scx_uevent_ops = {
 };
 
 /*
- * Used by sched_fork() and __setscheduler_prio() to pick the matching
+ * Used by sched_fork() and __setscheduler_class() to pick the matching
  * sched_class. dl/rt are already handled.
  */
 bool task_should_scx(int policy)
@@ -9765,7 +9765,7 @@ __bpf_kfunc struct task_struct *bpf_iter_scx_dsq_next(struct bpf_iter_scx_dsq *i
  * bpf_iter_scx_dsq_destroy - Destroy a DSQ iterator
  * @it: iterator to destroy
  *
- * Undo scx_iter_scx_dsq_new().
+ * Undo bpf_iter_scx_dsq_new().
  */
 __bpf_kfunc void bpf_iter_scx_dsq_destroy(struct bpf_iter_scx_dsq *it)
 {
diff --git a/kernel/sched/ext/internal.h b/kernel/sched/ext/internal.h
index 27bbf5e04d90..5d31df2b265c 100644
--- a/kernel/sched/ext/internal.h
+++ b/kernel/sched/ext/internal.h
@@ -442,7 +442,7 @@ struct sched_ext_ops {
 	 *
 	 * Note that this callback may be called from a CPU other than the
 	 * one the task is going to run on. This can happen when a task
-	 * property is changed (i.e., affinity), since scx_next_task_scx(),
+	 * property is changed (i.e., affinity), since set_next_task_scx(),
 	 * which triggers this callback, may run on a CPU different from
 	 * the task's assigned CPU.
 	 *
-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] sched_ext: Fix several comment issues
  2026-08-27  9:14 [PATCH] sched_ext: Fix several comment issues Wanwu Li
@ 2026-08-27  9:56 ` Zhan Xusheng
  2026-08-31 16:53 ` Tejun Heo
  1 sibling, 0 replies; 3+ messages in thread
From: Zhan Xusheng @ 2026-08-27  9:56 UTC (permalink / raw)
  To: liwanwu; +Cc: tj, void, arighi, changwoo, linux-kernel, sched-ext, zhanxusheng

From: Zhan Xusheng <zhanxusheng@xiaomi.com>

Grepping the tree for the old spellings turns up exactly the lines you
touch and nothing else, and the new names hold up against what the
comments around them claim: __setscheduler_class() does return a
sched_class (kernel/sched/core.c:7608), task_should_scx() is reached from
it at 7617 and from the sched_fork() path at 4862, and the @running
callback documented at internal.h:439 is the one set_next_task_scx()
triggers.

Reviewed-by: Zhan Xusheng <zhanxusheng@xiaomi.com>

One thing for the changelog rather than the diff: it lists three renames
while the patch fixes four sites, because __setschduler_prio and
__setscheduler_prio are two spellings of the same stale name.

Thanks,
Zhan Xusheng

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] sched_ext: Fix several comment issues
  2026-08-27  9:14 [PATCH] sched_ext: Fix several comment issues Wanwu Li
  2026-08-27  9:56 ` Zhan Xusheng
@ 2026-08-31 16:53 ` Tejun Heo
  1 sibling, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2026-08-31 16:53 UTC (permalink / raw)
  To: Wanwu Li
  Cc: David Vernet, Andrea Righi, Changwoo Min, sched-ext, linux-kernel

Applied to sched_ext/for-7.3-fixes with the first fixed comment block
rewrapped to stay within 80 columns:

-		 * - It's unsafe to use __setscheduler_class() on an init_task to
-		 *   determine the sched_class to use as it won't preserve its
-		 *   idle_sched_class.
+		 * - It's unsafe to use __setscheduler_class() on an init_task
+		 *   to determine the sched_class to use as it won't preserve
+		 *   its idle_sched_class.

Thanks.

--
tejun

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-31 16:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-27  9:14 [PATCH] sched_ext: Fix several comment issues Wanwu Li
2026-08-27  9:56 ` Zhan Xusheng
2026-08-31 16:53 ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®