Skip to contentSkip to conversation

sched: fix a stale comment in pick_next_task()

PATCH Applied Masahiro Yamada 2 participants 2 messages May 19, 2021 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched: fix a stale comment in pick_next_task()

fair_sched_class->next no longer exists since commit a87e749e8fa1 ("sched: Remove struct sched_class::next field").

Now the sched_class order is specified by the linker script.

Rewrite the comment in a more generic way.

---

 kernel/sched/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/core.c +1 -1
index 5226cc26a095..fd3b7079b9f2 100644
@@ -4961,7 +4961,7 @@ pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
 		if (unlikely(p == RETRY_TASK))
 			goto restart;
 
-		/* Assumes fair_sched_class->next == idle_sched_class */
+		/* Assume the next prioritized class is idle_sched_class */
 		if (!p) {
 			put_prev_task(rq, prev);
 			p = pick_next_task_idle(rq);
Signature · 1 line
2.27.0
#1 lore raw

[tip: sched/core] sched: Fix a stale comment in pick_next_task()

The following commit has been merged into the sched/core branch of tip:

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     1699949d3314e5d1956fb082e4cd4798bf6149fc
Gitweb:        https://git.kernel.org/tip/1699949d3314e5d1956fb082e4cd4798bf6149fc
Author:        Masahiro Yamada <[email protected]>
AuthorDate:    Wed, 19 May 2021 15:37:09 +09:00
Committer:     Ingo Molnar <[email protected]>
CommitterDate: Wed, 19 May 2021 13:03:21 +02:00

sched: Fix a stale comment in pick_next_task()

fair_sched_class->next no longer exists since commit:

a87e749e8fa1 ("sched: Remove struct sched_class::next field").

Now the sched_class order is specified by the linker script.

Rewrite the comment in a more generic way.

---
 kernel/sched/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/core.c +1 -1
index 3ec420c..3d25272 100644
@@ -5318,7 +5318,7 @@ __pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
 		if (unlikely(p == RETRY_TASK))
 			goto restart;
 
-		/* Assumes fair_sched_class->next == idle_sched_class */
+		/* Assume the next prioritized class is idle_sched_class */
 		if (!p) {
 			put_prev_task(rq, prev);
 			p = pick_next_task_idle(rq);