Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4634849pxb; Tue, 5 Oct 2021 07:16:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsyobgY5p8hXmeRQbxay1fJgbL6gLAEJ8vLOrQIxOCMYTDm1vK0hZQduYvL/WSa9F5+TD2 X-Received: by 2002:a17:902:b696:b0:13a:7871:55f5 with SMTP id c22-20020a170902b69600b0013a787155f5mr5565461pls.60.1633443369952; Tue, 05 Oct 2021 07:16:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633443369; cv=none; d=google.com; s=arc-20160816; b=ZgmxXMx8EWWcM3lBwIb4R3QeZhw5LoO7T+9/u9GCEjhhpSAnV+GAxCrHrCBFkTJBKx l+ZM1GKRWy2MlAb9pTAd6V0LIyOUD9K3jXlC8DEBTeKFEc6ootbL5iBIyglFimrob5d/ bIUMKkJ0U1lYkDSLPa5I/iPoEGqDBDS0mEYXW0lkUuthNT8jUCHhek/iTDywzPE0YKeR Pan89ys4O9D6g5YM9JKqN2bMKY0ch6Rx+24k4WvttCLedRfjMCFy47dGw26GkESX+trV uGAiRmSyH2s1RnKX+gvrOKmKKvx5bUBn9xMAp+BV2DuUMIy2mubjlcFG5XRogMFOKDYQ K0Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=jC5YUKVeo82cyr7A4Ga7lDpfSuqDBcWqyQuXLUOm1Ro=; b=h7jtOVhtxa95xCJ+1d7QscjpOHO6xJyGG9n/6tF42qNkyBDGnZntPmvwYEWNHGx0m/ qNy/QOQmGwsZ2gKTk5gCaWLigeO6VQ3lKJs3ZbwRTVHvkkZUKkDOp55kluSWdsu1BlNi HeSFV3ams6xsmGzqlXnWiKG74Q7xrm98cmzWDeFuY3eeEeffEFgcpr5qRLICiSYsP4yC UI//sjvV8mh2wzAg/tEEULvBfHIp1vUvE9dHOEhxdiDb3BTFzLPZbzR0+Yu3JxJ8ofvW S9+I+M3m/JqFFdgktOTnrm+G85SOVOyddMoWnAkMY8rbYhhnB1aOS5btiAGiKBrgPiW+ wKeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=FQJAzNct; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=UPW6gNe+; 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=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e24si24099504pgt.593.2021.10.05.07.15.57; Tue, 05 Oct 2021 07:16:09 -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=@linutronix.de header.s=2020 header.b=FQJAzNct; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=UPW6gNe+; 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=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236495AbhJEOPG (ORCPT + 99 others); Tue, 5 Oct 2021 10:15:06 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:51374 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235601AbhJEOOC (ORCPT ); Tue, 5 Oct 2021 10:14:02 -0400 Date: Tue, 05 Oct 2021 14:12:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1633443131; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jC5YUKVeo82cyr7A4Ga7lDpfSuqDBcWqyQuXLUOm1Ro=; b=FQJAzNct4U8HMuG0qDU8mxq4zUncv2rLeWbPNiofETq1nIEz5Mk9nwMzh51wN06w8bEDd6 P2/N6K4+Dw5w6vm3XR8h1pt2BvH31HWJtMSmXd2M44AGG0Xc4gkMik+wTURJRnOk+sD/j8 iPTXN5DX+kpg1FF8FKBmEl0qDzXU2TbfnmlcQBzIk7V9njs5+wk9pljbEZqiZ4/Dg5ypyi KHsPL9Mb2Vie5uyHhZPDCi8pcmh0zYJo/T5Y0RpUWxsosvL+29KZ2uM+dePx5q1QDOmRGX 2+3vvuECOTGObI39y+UTlhLKrfLSa4MEWRcxyRwIX6ULA5q/6QsZyEISe0scBA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1633443131; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jC5YUKVeo82cyr7A4Ga7lDpfSuqDBcWqyQuXLUOm1Ro=; b=UPW6gNe++hgfoB1Y6eGPCRc+NDwKmJue6awrwpfFFASw6X8fe4MRme0D0NhyQ4lsBugfEm frjmshy3xvs76PBQ== From: "tip-bot2 for Yafang Shao" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched/fair: Use __schedstat_set() in set_next_entity() Cc: Yafang Shao , "Peter Zijlstra (Intel)" , Mel Gorman , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20210905143547.4668-2-laoar.shao@gmail.com> References: <20210905143547.4668-2-laoar.shao@gmail.com> MIME-Version: 1.0 Message-ID: <163344313032.25758.6902441477709070229.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the sched/core branch of tip: Commit-ID: a2dcb276ff9287fcea103ca1a2436383e8583751 Gitweb: https://git.kernel.org/tip/a2dcb276ff9287fcea103ca1a2436383e8583751 Author: Yafang Shao AuthorDate: Sun, 05 Sep 2021 14:35:40 Committer: Peter Zijlstra CommitterDate: Tue, 05 Oct 2021 15:51:44 +02:00 sched/fair: Use __schedstat_set() in set_next_entity() schedstat_enabled() has been already checked, so we can use __schedstat_set() directly. Signed-off-by: Yafang Shao Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mel Gorman Link: https://lore.kernel.org/r/20210905143547.4668-2-laoar.shao@gmail.com --- kernel/sched/fair.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index fd41abe..61d3e3b 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4530,9 +4530,9 @@ 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, - max((u64)schedstat_val(se->statistics.slice_max), - se->sum_exec_runtime - se->prev_sum_exec_runtime)); + __schedstat_set(se->statistics.slice_max, + max((u64)se->statistics.slice_max, + se->sum_exec_runtime - se->prev_sum_exec_runtime)); } se->prev_sum_exec_runtime = se->sum_exec_runtime;