Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1315269pxb; Thu, 16 Sep 2021 05:03:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyz5sj9L63BtblafHkkEBnaemPOKZdfSQayM+EG7ngk3d1dIkl/oDNyaizmyb7/1byxkAyR X-Received: by 2002:a6b:b88a:: with SMTP id i132mr4019518iof.215.1631793789368; Thu, 16 Sep 2021 05:03:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631793789; cv=none; d=google.com; s=arc-20160816; b=RQgD+ATx9GxqH04rOWXudlCS+n/dMlxffGLPahHdUyGIQg7xDIAKcL/sv/AWv65JFo IHse/mpfFOD2zvF2VkNMN0494YjEYsxV/i9faK2v051MeWlqkvYn5cElahiyKm1kpmla 8V/hl2luNMwzVyXrs67hPwRMwrNX/0K+M53BCfcQOblRhniAPDQULBHMLCMplpA25MuI aMCXx5oa3xZNnB/mKs/m+0RcNyvJ1Y3upRZb/8QYLGf99eEzRaezcph6ZokYaFoyL1Jy 9V76Wa/lbNWDCyiTOUsLpnHVdmEh9/ebi6/xUzyZKpnoqCbEtB9nY+Xep7TNlm1XSCj8 hwEg== 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=ol3fZGCyJT1wVKos2VLXEk/1aUNdYsozN88GQN84voc=; b=NAn9Igd73mqU5HXyhW+spCajAHup89rqdf3FKp1nPSWAxjs1hm2KhyHAVx8ruXBBPq MXBRiGVRBl/KaKZk6vgVFvbdcpg4ZsokZGMEYdzfX8jxyAFVmQrfnb68DBlA6tdHM/sp 7Bs7rL9HOnBrHS7U21CPn6NvhL8SoouhQ0YoUYDu1shmh76TEN5YxwWBPD99OJhr9R7U nQFsKZZ+glHKKwHUauddlWL8eqhXw0KOEP+cbgtdz9ad9cngR7rsI6T0thNj7dk7FFk0 xFlziFctC9d2aTwlBXJbLSxX8GXx0lRU/dU1Wdg6CZ/WcBqsmw2yVYAPILooCil2wznr 1jMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="CWv/cz8t"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=5fuiu6po; 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 20si2375266ioz.25.2021.09.16.05.02.54; Thu, 16 Sep 2021 05:03: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="CWv/cz8t"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=5fuiu6po; 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 S239005AbhIPMBT (ORCPT + 99 others); Thu, 16 Sep 2021 08:01:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238808AbhIPMAy (ORCPT ); Thu, 16 Sep 2021 08:00:54 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3072C0613CF; Thu, 16 Sep 2021 04:59:33 -0700 (PDT) Date: Thu, 16 Sep 2021 11:59:31 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1631793572; 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=ol3fZGCyJT1wVKos2VLXEk/1aUNdYsozN88GQN84voc=; b=CWv/cz8teUIUFkWkd1uy7HNDc4EXXSmBSjqVjaiAFoaNZs67qLzJNvoxjQur1YlqvBFcvP 7zZEG1qfrd7h9HLbziE5feg9MDNSf3k/CJTqUpRWd8asv10aA4Vysn/s4eOqizC8z34aAv KtHmGWiZbrNlmwks/srjIWwF3P22jS7egTdZleDT5nVDfPl1Un6yb9ylPiWqaAlZ8ADBcK uFXWFRZ1WYkM/Nl5DI8cRuNOW/cuVONTy1Xo5KOoyhM7bg0sGHZCsbZT/ZYeqOxJ2BxfcA +nxH7kRhZf6vSbcjAyJXT8a3zZ5LvtyczYVQx9Mb/C0LM8KSSQje/Yut2q7j2Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1631793572; 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=ol3fZGCyJT1wVKos2VLXEk/1aUNdYsozN88GQN84voc=; b=5fuiu6poIin4nCzEANlKwYSbKa15tgndsWe0KqU/MaIjWaVvu0PdSju5Oi975vS23NSIez QgGwf12n46YJDeAQ== 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: <163179357151.25758.3430253645020974508.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: 5855e81a4a3b6eb8967bff760e7d1f1b82228525 Gitweb: https://git.kernel.org/tip/5855e81a4a3b6eb8967bff760e7d1f1b82228525 Author: Yafang Shao AuthorDate: Sun, 05 Sep 2021 14:35:40 Committer: Peter Zijlstra CommitterDate: Wed, 15 Sep 2021 17:48:58 +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 3594884..148b830 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4501,9 +4501,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;