Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2651973pxb; Tue, 24 Aug 2021 04:31:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlWlm3W+/IQ94H2DwVi2ygP3zm/w5moRLRfkUKNLR/mGDfsi5XWFDMk71CeprBCp6WHqYp X-Received: by 2002:a17:906:4943:: with SMTP id f3mr40216899ejt.102.1629804711422; Tue, 24 Aug 2021 04:31:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629804711; cv=none; d=google.com; s=arc-20160816; b=mzE6LC6thTxf2Usqg2IPK1ycPWeWDMJOSqAO/Czzb3gswUXyt9ALgOpFtRE+KLBPOE 0uYEY3mvcjOGEKqJcEvCeG6sARkPigKYGUVXrl37uElnnC5Wd8Ctr1xE7mTRtM5YtEPe YF0r1YEb4Eoe2xPyHK5tzsQmJiptfPuV1VCVM/ujHFK098HkwcjrD4ku+9gnVY29x47O zImZ6OWKIIziMe+qhPGPSvl8/rJgI1Zv7Y8tDLfJKAdsl7ZPDToZmWgv2dlpriDFaJNN ytLgRscJQYR9xrmlSiL6Mo3lySJ0NhKk94ytQSLZlE7N2pVInAZbkDfQ+lhujyVo0XL2 WSvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JVr8PGszwG12RQLxsTfg9itjnLUTmikBGfspTpaerwM=; b=eZFfKmV0Ei/4ql+cbY3OfThscI53+0zlKt5IgaJH7PgI3+y8ct7ZnGlx+Lm0FUcy2h m0blWP3eYpd2EHtWaUzkMHuRq6flboTu/GAjk0uImwL0Lp7fXxLHqPEb/n/g8vHo+JAK r4bXdRIjhRFpp0U4Sy96ZE2t1Hz7ZHlk6hZx6N8EMgcGLZ2vBWqdAyE4eC0RUMmdg+zw MhcpxrDCnhVyduf5eqnyjRyzwW6ACtvMcASqiqV2gEnDgSSO1nOEjxJUiLOhFMJvoTrz vIuYCao+Mq1539RQgj6B1uM2FlP6IvIVL0QawO/AkrA6EmiWSSC7zdDBAcG/xphle/0r eLcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZDZBH2mS; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id la20si21675578ejc.3.2021.08.24.04.31.28; Tue, 24 Aug 2021 04:31:51 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZDZBH2mS; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236708AbhHXLat (ORCPT + 99 others); Tue, 24 Aug 2021 07:30:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236614AbhHXLaq (ORCPT ); Tue, 24 Aug 2021 07:30:46 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A351BC061757; Tue, 24 Aug 2021 04:29:59 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id 2so4025037pfo.8; Tue, 24 Aug 2021 04:29:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JVr8PGszwG12RQLxsTfg9itjnLUTmikBGfspTpaerwM=; b=ZDZBH2mSLT+feJJpheykz9SuYyO5rGEd8xjPms8ZJXHWR7UNVDo6OrcCv6/ZZJbR6v LrCo4oy2tfRuKERpq5jszz44yJEx6I00vvNAxPd1AT6nBE0V0C1iA5KJ/8thCrUYnsCS 041S9U/TAG31QccfiPJChN6WbA+DsTyfwPoeP1I1/C71hW2b31StShyBit/D+bDTWmen 1JOKBV/6QWT3pWDsG3oxVbjstkaRsAjpsrB/Aq1GW0PzTmlIZJ16TAlpRHTOwjKk1wlo Qs1yjj0DnMQ45kI/FhidW03DGkx7UojtDQhFckrJr8rW1Bkl6sQFlOJTZo4Oyhk+G9OV XmJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JVr8PGszwG12RQLxsTfg9itjnLUTmikBGfspTpaerwM=; b=Mun1T59gC1owNqiNRDJ3xc/3lxDOr2bedN8wMYY9M49PCTQOyvGOVTBUbajlc+wSvk ZxQZR89N5zltlTUw81B/Drio4X5wCOzSe6rBELFtzB0g7kB0SaDBVz4ijzKrsZsIcRqw ec+XX5Wg8nHwBQgTHNYL65zDz7YJcq6whmlx6ZrNhq7Fh5l7z5oplYqnF7OdPlpIiI/n lyYhn45aIf8ioyDAZpV5k+MwlZB0W+qG7RVdkgPYsi8kunkS6BHs48MibTaBEqiFva6K 0khB/XK6fCEBW2p/Ozjiz7QTJbU+HWUMU3GELvZtwWR376dSXkXo84jtZswHvMymqsMv Fsrw== X-Gm-Message-State: AOAM532p8cLMIwjd3UYt+qfkmUC0an7OgV7evmSrqgHGQKBwGxlSEcR3 4w70FGTZludfEOFTuAzWHKw= X-Received: by 2002:a62:1888:0:b029:3c9:7957:519b with SMTP id 130-20020a6218880000b02903c97957519bmr38551885pfy.17.1629804599244; Tue, 24 Aug 2021 04:29:59 -0700 (PDT) Received: from localhost.localdomain ([45.77.24.247]) by smtp.gmail.com with ESMTPSA id on15sm2128732pjb.19.2021.08.24.04.29.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Aug 2021 04:29:58 -0700 (PDT) From: Yafang Shao To: mingo@redhat.com, peterz@infradead.org, mgorman@suse.de, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, bristot@redhat.com, achaiken@aurora.tech Cc: lkp@intel.com, linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org, Yafang Shao Subject: [PATCH v3 1/7] sched, fair: use __schedstat_set() in set_next_entity() Date: Tue, 24 Aug 2021 11:29:40 +0000 Message-Id: <20210824112946.9324-2-laoar.shao@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210824112946.9324-1-laoar.shao@gmail.com> References: <20210824112946.9324-1-laoar.shao@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org schedstat_enabled() has been already checked, so we can use __schedstat_set() directly. Signed-off-by: Yafang Shao Acked-by: Mel Gorman Cc: Alison Chaiken --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 5aa3cfd15a2e..422426768b84 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4502,7 +4502,7 @@ set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se) */ if (schedstat_enabled() && rq_of(cfs_rq)->cfs.load.weight >= 2*se->load.weight) { - schedstat_set(se->statistics.slice_max, + __schedstat_set(se->statistics.slice_max, max((u64)schedstat_val(se->statistics.slice_max), se->sum_exec_runtime - se->prev_sum_exec_runtime)); } -- 2.18.2