Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp415446pxk; Wed, 23 Sep 2020 06:38:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRMamQGFZsQ5y4CQvg40x+NGUHDHfFZxko5p7mBxiC6eAaPzToRtzefLdXMRYcym0khGK0 X-Received: by 2002:a05:6402:1b1d:: with SMTP id by29mr9777600edb.96.1600868310142; Wed, 23 Sep 2020 06:38:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600868310; cv=none; d=google.com; s=arc-20160816; b=A16kMlfFzMksIsUYvlLydEIWF9vG4MBJr+d9z1H97zw0SXvwMZ3ed1ukBR6StdND6c vStFxMN4uhX+bkC1IA1J8Xz6XP3fSDdN6ZOPFpLUlNRU/dJvIa4iEGqU7oKNU7eJfrvM sB3JnZ/fmiu1ZEEURC7qZqRuNv4lGe0WDJ88n9lUei0nW3LsYySfNYDXage7Mqy0thdq ZCUOw9tzIVMIYhuWznXjzLZRw4JyC3dmOBXHmYSx8VvKHmWB9Qcj1dkZ6Ua9jyDvehbR 7o5MuYmqom1Qe2Bmm2djp4zbr80nRRA/90dPlDd/Z2GMY67ikGiTsBniMBW7WyJKBG3C 8z4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=TJlcyWTS92rV5+Xy/T0EgbCXMEWX5uv3b81gnu7fRxs=; b=oa1MFabuNf8vM7kmH4VQ2/PDh0ZK6x9N3wGRjrCgrNIaa8KHoPxVJah06S0PI9d4YB FgE5Qi1PW0vRxgiMvj+7+aG1hLmEV9npWpqByZTuo5mau/MWU5BHEDu2xUvLikFkgZk0 u1TN/7/N/sl1uILy6+HGI7xVFNocuwqb14wdNV+mR2NFUtZL9U/csOwWsbh1X/HJNTjx 6/n1KInwHofGpDvxwZ6q/B6rnN5o5mNb0jZUdWHyWtw0RLo0vckoVmNJjbCpwImD3B4c FDGgTNb6WBF72XqehH39fHARAP4jaOxUQJt3VgjT+kPulG0hhMgKztCJVZQQtg0YbHRW hj3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a12si12531687eda.373.2020.09.23.06.38.05; Wed, 23 Sep 2020 06:38:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726587AbgIWNgy (ORCPT + 99 others); Wed, 23 Sep 2020 09:36:54 -0400 Received: from smtp.h3c.com ([60.191.123.56]:34822 "EHLO h3cspam01-ex.h3c.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726130AbgIWNgy (ORCPT ); Wed, 23 Sep 2020 09:36:54 -0400 Received: from DAG2EX03-BASE.srv.huawei-3com.com ([10.8.0.66]) by h3cspam01-ex.h3c.com with ESMTPS id 08NDaZ4n036800 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 23 Sep 2020 21:36:35 +0800 (GMT-8) (envelope-from tian.xianting@h3c.com) Received: from localhost.localdomain (10.99.212.201) by DAG2EX03-BASE.srv.huawei-3com.com (10.8.0.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 23 Sep 2020 21:36:39 +0800 From: Xianting Tian To: , , , , , , , CC: , Xianting Tian Subject: [PATCH] sched/fair: Use bool parameter for update_tg_load_avg() Date: Wed, 23 Sep 2020 21:29:35 +0800 Message-ID: <20200923132935.20778-1-tian.xianting@h3c.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.99.212.201] X-ClientProxiedBy: BJSMTP01-EX.srv.huawei-3com.com (10.63.20.132) To DAG2EX03-BASE.srv.huawei-3com.com (10.8.0.66) X-DNSRBL: X-MAIL: h3cspam01-ex.h3c.com 08NDaZ4n036800 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the file fair.c, sometims update_tg_load_avg(cfs_rq, 0) is used, sometimes update_tg_load_avg(cfs_rq, false) is used. So change it to use bool parameter. Signed-off-by: Xianting Tian --- kernel/sched/fair.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 1a68a0536..61dac1c58 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -831,7 +831,7 @@ void init_entity_runnable_average(struct sched_entity *se) void post_init_entity_util_avg(struct task_struct *p) { } -static void update_tg_load_avg(struct cfs_rq *cfs_rq, int force) +static void update_tg_load_avg(struct cfs_rq *cfs_rq, bool force) { } #endif /* CONFIG_SMP */ @@ -3300,7 +3300,7 @@ static inline void cfs_rq_util_change(struct cfs_rq *cfs_rq, int flags) * * Updating tg's load_avg is necessary before update_cfs_share(). */ -static inline void update_tg_load_avg(struct cfs_rq *cfs_rq, int force) +static inline void update_tg_load_avg(struct cfs_rq *cfs_rq, bool force) { long delta = cfs_rq->avg.load_avg - cfs_rq->tg_load_avg_contrib; @@ -3612,7 +3612,7 @@ static inline bool skip_blocked_update(struct sched_entity *se) #else /* CONFIG_FAIR_GROUP_SCHED */ -static inline void update_tg_load_avg(struct cfs_rq *cfs_rq, int force) {} +static inline void update_tg_load_avg(struct cfs_rq *cfs_rq, bool force) {} static inline int propagate_entity_load_avg(struct sched_entity *se) { @@ -3800,13 +3800,13 @@ static inline void update_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *s * IOW we're enqueueing a task on a new CPU. */ attach_entity_load_avg(cfs_rq, se); - update_tg_load_avg(cfs_rq, 0); + update_tg_load_avg(cfs_rq, false); } else if (decayed) { cfs_rq_util_change(cfs_rq, 0); if (flags & UPDATE_TG) - update_tg_load_avg(cfs_rq, 0); + update_tg_load_avg(cfs_rq, false); } } @@ -7887,7 +7887,7 @@ static bool __update_blocked_fair(struct rq *rq, bool *done) struct sched_entity *se; if (update_cfs_rq_load_avg(cfs_rq_clock_pelt(cfs_rq), cfs_rq)) { - update_tg_load_avg(cfs_rq, 0); + update_tg_load_avg(cfs_rq, false); if (cfs_rq == &rq->cfs) decayed = true; -- 2.17.1