Skip to contentSkip to conversation

sched/rt: Fix a comment in pick_next_task_rt()

PATCH New Muchun Song 2 participants 2 messages Oct 27, 2018 – Oct 29, 2018 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched/rt: Fix a comment in pick_next_task_rt()

Commit f4ebcbc0d7e0 ("sched/rt: Substract number of tasks of throttled queues from rq->nr_running") added a new member rt_rq->rt_queued, which is used to indicate the status of rq->rt enqueue or dequeue. So, the check rt_nr_running was removed and we now check rt_queued.

Fix the comment in pick_next_task_rt() to avoid confusing.

---
 kernel/sched/rt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/rt.c +1 -1
index 2e2955a8cf8f..a21ea6021929 100644
@@ -1561,7 +1561,7 @@ pick_next_task_rt(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
 
 	/*
 	 * We may dequeue prev's rt_rq in put_prev_task().
-	 * So, we update time before rt_nr_running check.
+	 * So, we update time before rt_queued check.
 	 */
 	if (prev->sched_class == &rt_sched_class)
 		update_curr_rt(rq);
Signature · 1 line
2.17.1
#1 lore raw

[tip:sched/urgent] sched/rt: Update comment in pick_next_task_rt()

sched/rt: Update comment in pick_next_task_rt()
Commit-ID:  a68d75081aeccfb169575bea6f452a5a12b9f49b
Gitweb:     https://git.kernel.org/tip/a68d75081aeccfb169575bea6f452a5a12b9f49b
Author:     Muchun Song <[email protected]>
AuthorDate: Sat, 27 Oct 2018 11:05:17 +0800
Committer:  Ingo Molnar <[email protected]>
CommitDate: Mon, 29 Oct 2018 07:18:04 +0100

sched/rt: Update comment in pick_next_task_rt()

Commit:

f4ebcbc0d7e0 ("sched/rt: Substract number of tasks of throttled queues from rq->nr_running")

added a new rt_rq->rt_queued field, which is used to indicate the status of rq->rt enqueue or dequeue. So, the ->rt_nr_running check was removed and we now check ->rt_queued instead.

Fix the comment in pick_next_task_rt() as well, which was still referencing the old logic.

---
 kernel/sched/rt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/rt.c +1 -1
index 2e2955a8cf8f..a21ea6021929 100644
@@ -1561,7 +1561,7 @@ pick_next_task_rt(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
 
 	/*
 	 * We may dequeue prev's rt_rq in put_prev_task().
-	 * So, we update time before rt_nr_running check.
+	 * So, we update time before rt_queued check.
 	 */
 	if (prev->sched_class == &rt_sched_class)
 		update_curr_rt(rq);