From nobody Fri Dec 19 11:15:22 2025 Received: from wxsgout04.xfusion.com (wxsgout03.xfusion.com [36.139.52.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8552D1B26C for ; Tue, 19 Dec 2023 12:43:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=xfusion.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xfusion.com Received: from wuxshcsitd00600.xfusion.com (unknown [10.32.133.213]) by wxsgout04.xfusion.com (SkyGuard) with ESMTPS id 4SvbrW1NwFzB0K9t; Tue, 19 Dec 2023 20:40:27 +0800 (CST) Received: from localhost (10.82.147.3) by wuxshcsitd00600.xfusion.com (10.32.133.213) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 19 Dec 2023 20:43:54 +0800 Date: Tue, 19 Dec 2023 20:43:53 +0800 From: Wang Jinchao To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , CC: , Subject: [PATCH] sched/fair: Correct comment for enqueue_task_fair Message-ID: <202312192042+0800-wangjinchao@xfusion.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline X-ClientProxiedBy: wuxshcsitd00601.xfusion.com (10.32.135.241) To wuxshcsitd00600.xfusion.com (10.32.133.213) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" There is `add_nr_running(rq, 1);` in `enqueue_task_fair`, so the original comment is confusing, correct it. Signed-off-by: Wang Jinchao --- kernel/sched/fair.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index d7a3c63a2171..0230f4594dfc 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6652,9 +6652,8 @@ static int sched_idle_cpu(int cpu) #endif =20 /* - * 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=20 + * and put the task into the rbtree, and increase nr_running.=20 */ static void enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags) --=20 2.40.0