Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp469730rdh; Tue, 19 Dec 2023 04:44:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IGgXiXtDOT3DYdOE/RoKmBC4lDo4d8bsyAZqyyKcT2Ot47TjwrIBQWWhrlijti/XxIk/PlE X-Received: by 2002:a05:6214:cca:b0:67f:356:5731 with SMTP id 10-20020a0562140cca00b0067f03565731mr13712753qvx.44.1702989849578; Tue, 19 Dec 2023 04:44:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702989849; cv=none; d=google.com; s=arc-20160816; b=jqB4ptPRDFyNmr5EN2LdZdvecVidnZabHyTYHDnBt17kzpL2NYL40EL7xTpPECTa31 rZYJKP2WFiiN6XFnxQpXZLkUnY8aLFozMzRyblCjSEpUCc0hQlOcDhCvUZnBqh6iiwSv awtQyHin5zslKE5JlQPjg03QYaFPEKcveYQk9+AejsD9cBceVpigwHgf3FBQhM5UUSI7 uxskfZelvhqAgqyoVXVs9L/YsmnjHmKSRsHObqaM8Tzp3gRUEDAwZOhZD7MIx8kTsI9t Bj0+R4Ds3ZlrQzxTm9L2vpWoOGwRNxkbVa3CFmmyDdoyRCCtr/b5x3cQqsr4wJSLXPDw tFww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date; bh=3FajsNPBhnzbxd1VPYgmlMWeuhH28e2FpLwIbPR8Vjc=; fh=f40UFx4PIoN5VHjot5Te0Vsnl2epc2I3Vpkjl2f6MCo=; b=kBZZOMr+pXLfDzlyGp46udn41fkDlf+fGeOb7JjJnKHLkwZRQF/urJOoM1CNqOh1qo iBDrJbk8R8aEYq+4Ha+tv98zdDFXs8amxjL/hxIVD44V2+kJx1S9wqr2Gry+C740vJ4P sWGSCEjfm/fcekv2PhaAIZKZBcc04arJmBmwf93dfRh0/BJVZdQTZtZdPjJg37vpt/Xm 5p7+EniCNx6MFfT3Tu+XZg4hJR8umdh7RnQh3r0XMNrLVKRsZVsvaRqJNrUgogSeP2kc wTd2QNUDBLx/Ge6PkmL8R7YdadFTZB3/MMvtN1EtayshLCyvuHmVHcbq+9+VdgIzb0zX WZ4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-5184-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5184-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id t19-20020a0cde13000000b0067ef418845fsi3313917qvk.128.2023.12.19.04.44.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 04:44:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5184-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-5184-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5184-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 590301C23D3E for ; Tue, 19 Dec 2023 12:44:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CFFD61B277; Tue, 19 Dec 2023 12:44:01 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org 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-Type: text/plain; charset="us-ascii" Content-Disposition: inline X-ClientProxiedBy: wuxshcsitd00601.xfusion.com (10.32.135.241) To wuxshcsitd00600.xfusion.com (10.32.133.213) 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 /* - * 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) -- 2.40.0