Skip to contentSkip to conversation

sched/fair: Correct comment for enqueue_task_fair

PATCH New Wang Jinchao 1 participant 1 message Dec 19, 2023 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched/fair: Correct comment for enqueue_task_fair

There is add_nr_running(rq, 1); in enqueue_task_fair, so the original comment is confusing, correct it.

---
 kernel/sched/fair.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
kernel/sched/fair.c +2 -3
index d7a3c63a2171..0230f4594dfc 100644
@@ -6652,9 +6652,8 @@ static int sched_idle_cpu(int cpu)
 #endif
 
 /*
- * The enqueue_task method is called before nr_running is
- * increased. Here we update the fair scheduling stats and
- * then put the task into the rbtree:
+ * The enqueue_task method is called to update the fair scheduling stats 
+ * and put the task into the rbtree, and increase nr_running. 
  */
 static void
 enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)
Signature · 1 line
2.40.0