Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4635583pxb; Tue, 5 Oct 2021 07:17:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+xpA1hLc4rg+WsViCXFPletEkBItQc6PHLkG6pX/dACSlsS+dDRGKObyZF4BOH/J7iPR1 X-Received: by 2002:a05:6402:1157:: with SMTP id g23mr27541478edw.379.1633443420323; Tue, 05 Oct 2021 07:17:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633443420; cv=none; d=google.com; s=arc-20160816; b=RX+iKmjpj56RRsMUdDVRblcSGa1sEyKRgT1l4KBYEJIpvtDyeQxntYYx02pGp/nkzj ZYG4JwaamSpFNgIvcdo+x1gC6sKVuhfwhUp4jJsMX0PRRg/6ENxs4iz5+cc+5BTVJNRt wVZlVXfN06Cx/twYQCJ8FT6E5azg4kc9lRaN2vNrYKtKURRWaOXlmCW//8ScLMrHQvGo ia9rY1AL+GZd9Ccv9b+v0dSrBFnkBvSjltRei6eWbRilSyLv5MqDwGZNnHJXMbDrUV8W 7WcSvm2otT6f7EkjH9Aztxa/qVxIVorNEdojnRK9Xa0MifHbSfC60bitVRubmi1ZCUN/ 2pZA== 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=zjw5LlBy+Xiql3NGjLFc0yu+wIQnvu+FRE2jLZRbsso=; b=E83lWuntPW9sdu8XG1Wl+o4vspv08fu24wxbq65Nm15Yxeyq2oWBakCbeArp8QGNxn nBceOsS0HXu1YDOmjPcQEu12x++kKfTfDhqkUGbA9XFpfyz86FEWc76/Rs4BGSSYSJk2 MHZy2Ltf0QKos6dsnEt62ExmBl9Shp1Vw6ZZZnwZ60lrHlRN0xWTVNjb7ANup476MDa7 sb33tyKx9sbpt0PcHDikM73WHaUPUsOrQAQ8a6D1IrNK/zV2SHsFNYnWXoV4KnbnKZG+ jaJ7H4a2P3FU8MWoCeJVdxSHyGmQTPhSmXrfrJRv3z2OI6Rjyjr/2tcbqxiqGFsWJBmi 9GcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=xr38VHEY; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 z21si20289390eji.707.2021.10.05.07.16.30; Tue, 05 Oct 2021 07:17:00 -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=xr38VHEY; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 S235715AbhJEOOE (ORCPT + 99 others); Tue, 5 Oct 2021 10:14:04 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:51238 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235332AbhJEONy (ORCPT ); Tue, 5 Oct 2021 10:13:54 -0400 Date: Tue, 05 Oct 2021 14:12:01 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1633443122; 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=zjw5LlBy+Xiql3NGjLFc0yu+wIQnvu+FRE2jLZRbsso=; b=xr38VHEYJPz3LLdfgGJqe2+D9HUpw4OTMXOnOLPqicsyNYapGvN25uVcqI2NNbxHm6tdK0 sy5fmOJwkzkM4cDA8yotdfdTpxlTyLbaV117c8VMHneO8B8spZxlP90zH8U25frWrutp8p Jvd9ZzNLyz7jeEKLFQ/FIjHcSJRViqzdoeW4fUVq3hb+RYz/q2zYYLzWLgMG98W7UtUKEH kt68CFy+wPz8ik3bUi5NSGob4EiPjj957LYLKiDt8g+1o8j+iS8XEo/HxRU8rgqhBacfSy 0tlJLhduAiQ6TK7Mwps01mt+Bv0+4GOzR8qApXV6+/k/tpKx+PrDl4O/G0fhVQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1633443122; 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=zjw5LlBy+Xiql3NGjLFc0yu+wIQnvu+FRE2jLZRbsso=; b=qR16D3/ctoD+EMXG4bcuh36OOeMg32N1D1Ynl8BOX9VPVKAeJ0z1+vxIN6Z80siKFwZS9W YlrWU8RIP9OsJgBw== From: "tip-bot2 for Ricardo Neri" 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: Optimize checking for group_asym_packing Cc: Ricardo Neri , "Peter Zijlstra (Intel)" , "Joel Fernandes (Google)" , Len Brown , Vincent Guittot , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20210911011819.12184-4-ricardo.neri-calderon@linux.intel.com> References: <20210911011819.12184-4-ricardo.neri-calderon@linux.intel.com> MIME-Version: 1.0 Message-ID: <163344312196.25758.5256572606366909232.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: 6025643596895695956c27119c6b0bfa40d8035b Gitweb: https://git.kernel.org/tip/6025643596895695956c27119c6b0bfa40d8035b Author: Ricardo Neri AuthorDate: Fri, 10 Sep 2021 18:18:16 -07:00 Committer: Peter Zijlstra CommitterDate: Tue, 05 Oct 2021 15:52:02 +02:00 sched/fair: Optimize checking for group_asym_packing sched_asmy_prefer() always returns false when called on the local group. By checking local_group, we can avoid additional checks and invoking sched_asmy_prefer() when it is not needed. No functional changes are introduced. Signed-off-by: Ricardo Neri Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Joel Fernandes (Google) Reviewed-by: Len Brown Reviewed-by: Vincent Guittot Link: https://lkml.kernel.org/r/20210911011819.12184-4-ricardo.neri-calderon@linux.intel.com --- 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 71b30ef..e050b1d 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -8631,7 +8631,7 @@ static inline void update_sg_lb_stats(struct lb_env *env, } /* Check if dst CPU is idle and preferred to this group */ - if (env->sd->flags & SD_ASYM_PACKING && + if (!local_group && env->sd->flags & SD_ASYM_PACKING && env->idle != CPU_NOT_IDLE && sgs->sum_h_nr_running && sched_asym_prefer(env->dst_cpu, group->asym_prefer_cpu)) {