Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4392514pxu; Tue, 1 Dec 2020 04:00:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJzsFc5ghaxGrAWrhydv8BpsLMlzHpmopAEE2LoAV7FQChXcf9MZGrOzNj48VPqbPm085l/d X-Received: by 2002:a17:906:c83b:: with SMTP id dd27mr2663647ejb.356.1606824007239; Tue, 01 Dec 2020 04:00:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606824007; cv=none; d=google.com; s=arc-20160816; b=WBK41G5fCp4p06NdIB4fu6R7OSB2bvUJpr/3eaZR02c4vGE5WAc3fidnLqeAEIZ+Nq yuDIHMxqYeRv1+Av9QtrhldxBxLC0c6MdQCmsIeGlJoP354HOZgWQblQrZc5VjT7SGJc xAFmEPs74MS/DuZXKUX45Y0yiK8hg/WgYDgVvrlGI8Z4LxRnzLNz27He7bi94yKY0BIS s+ML5DGGARIMKcuBfgS0vJ7yrEr9E276gitMNIZQWAmXVNjr3TCOEt+9yn7HUMc6563z qD/iMp6Ir/Bft7S2VNlypPyi+OcoSxcaummW2J86GQ2kxQzoO+Dzl0PlmQQCvHpjeQON SysA== 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=GirRYv7Yp+UW6qivVdz+bDt6vd2WoU0OZWfuEpWcOf8=; b=czZXYtC2AbatpSSFXAvt+5wMt6SHzEZNyFGYKqdRy6h93CtQfYwTnI26zRB/kwcISJ 0RmtNE9PDVMJrVU9+1jek1rD8v/9jdtR+uBs51t423rDtln3QhOO/ZrSj4pAkoGNj8Z9 IBeWA1Dq22mN2ONx6BTTTda4ABrHSCa/M+s+xGMtOiSjDFe7M+tMYQ2rvuP2paZ1MaQZ sNYst2ciFz2ixUQ7rmrW/lgWUy3ePqe6kYzU/S4eRRg2yvYdUjvz83aq/b0QXFhNjwKY 0zMmTDVDb0PErpQOODfcOuQfFmWX8b0zJ6h8a4NIFrHw+rcsWBn/1y12j86RNX4vHJml idfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sQps+LyB; 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 h8si850643ejj.161.2020.12.01.03.59.44; Tue, 01 Dec 2020 04:00:07 -0800 (PST) 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=sQps+LyB; 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 S2389610AbgLALz4 (ORCPT + 99 others); Tue, 1 Dec 2020 06:55:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389210AbgLALz4 (ORCPT ); Tue, 1 Dec 2020 06:55:56 -0500 Received: from mail-oo1-xc43.google.com (mail-oo1-xc43.google.com [IPv6:2607:f8b0:4864:20::c43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7503C0613CF; Tue, 1 Dec 2020 03:55:15 -0800 (PST) Received: by mail-oo1-xc43.google.com with SMTP id l10so325662oom.6; Tue, 01 Dec 2020 03:55:15 -0800 (PST) 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=GirRYv7Yp+UW6qivVdz+bDt6vd2WoU0OZWfuEpWcOf8=; b=sQps+LyBnJwZ8DKm64dtvjIf/x6BKWuufRfjS+uqbL1cIrvOA9kDHvxBVioORhFq/6 xQ0wgds4a8Y4LL8lFPX85UVV9Zzkw6BCI8tNIQgbQiWcRz+MR5Md6eO/7HSK2bY4Logq dbp4z2OoZBso5VFKKBD6JsQvRWTeaFbKegSyDXfYUisLN1L5Hyq5FFW6ncY3PQhthsAD HX3W5MNdbC5/1kPf/0Njv8hVrTcLR3SQtdrcNs1qbSd/i/rjS4lKqrmJkPPmFQiisjVO vDgWPhG0AN/zMWKd25lJ0uOx14cz0PQdy3XO7UQ7B9bjSF1djZe9v8XQ+GX5NCGHZvdx kWCw== 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=GirRYv7Yp+UW6qivVdz+bDt6vd2WoU0OZWfuEpWcOf8=; b=G9nd8OspwQ98V5J3dX++bBY50Inj+IW6UZ1ZX5uF03kPj8CKXKRXFUc6JtOzS1lPFO 7Tx4JZGEcUEIxgu56i03sBptQ9cxEOGBPwpnYFWlEfxc0jSUWbVxhfn8vQljBZe0Zia6 lEY3zzh0B+BKTlGagItlXv9Vp8AFsFvAmbJXGWY/AIAVqg8bmsXRqWtdxnZ6PkvvCZsc 2GhEUZzc+eu8LA2y3s87Nsp0v32fIaExYzMPRNIUjWsYKQV3rahPWs3WZ4ZqrptEncs+ euKrc1FqgVLlvP0F9VUeRVpZVOs6FmXq3eVeON8/sXj/bxsyxcmwvy8caKKmMWtevYm1 BV3A== X-Gm-Message-State: AOAM530lguqdqsN6uca0BEdx6AGzYOdqQGxnZhBBzPhlqCjGdPpXHaZl Ef5ortqeuK5Uj0OHGuWGsKY= X-Received: by 2002:a4a:d347:: with SMTP id d7mr1507916oos.47.1606823715306; Tue, 01 Dec 2020 03:55:15 -0800 (PST) Received: from localhost.localdomain ([122.225.203.131]) by smtp.gmail.com with ESMTPSA id o6sm342592oon.7.2020.12.01.03.55.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Dec 2020 03:55:14 -0800 (PST) From: Yafang Shao To: mgorman@suse.de, mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, bristot@redhat.com, qianjun.kernel@gmail.com Cc: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org, Yafang Shao Subject: [PATCH 2/6] sched, fair: use __schedstat_set() in set_next_entity() Date: Tue, 1 Dec 2020 19:54:12 +0800 Message-Id: <20201201115416.26515-3-laoar.shao@gmail.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20201201115416.26515-1-laoar.shao@gmail.com> References: <20201201115416.26515-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 --- 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 8ff1daa3d9bb..7e7c03cede94 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4414,7 +4414,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.4