Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp999132rdb; Tue, 30 Jan 2024 05:16:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IFMMjf0k+e5hUTnsyqkuD0ZMTKCG6P6+BO44BJ1u9nTyhEqAyk44DPIWEy9IorWM/FQ7Nyz X-Received: by 2002:ac8:5c09:0:b0:42b:3e07:7a8 with SMTP id i9-20020ac85c09000000b0042b3e0707a8mr1077997qti.117.1706620617358; Tue, 30 Jan 2024 05:16:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706620617; cv=pass; d=google.com; s=arc-20160816; b=r38y7AkXw7zapyUPPZfaHoe+QocV2u7aai+ASF+6yg91Ln9ZRAheqczZS/2WvLHj4j xJfm+xt5PILvH3QkOvpYqghyoi9cThxBz8t088rhe2XvBEpfhj8sB8vWo8ExvnEcjRUn 15Z6Tvi5fNYj1Frok9Gk+l+75kTEU9LD15QbdQI+IZwiMzgQDkFY10F2mHgwWEW7iYrb 7sW0WLvF50Np5kdHAu/eK9JBcbxxAPiVqA5V2jTqlIxMC3ERwTZHdt//r7UnoZ6ds5cN IqkbEZjYgQoW5DXKoYWivv+b3mxvnX4iApxrK0tLBfYPmD57lvN/0tbQMLnFkqGpVgZi Nvew== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=bfF1zBa7nVc7gHEDl12BBpqrow2jXHEF8ijxJ/UB0jQ=; fh=CH0OO+rsEMoKRW5HY96+2DQ466rE9ttKX9bm1c+/3Ro=; b=QgoNVuEy8kiPqeteRhf00YZvIm0HE+AXwSjZnM52hQzgS+CX/U4siL1oM8e1OXzD6Q 1LYcxEKNlxkW/lupg6OXF+hjiGG9W0DHcnYgCaDkPzrFB/8GDfPJiOvDV705Au2Ue8XG QnX5NR+ZDlPVhlC3xdFzttcjbuFNESBrGcJFMgwwK8pNcS/W8M2Hy9p8db82A+cACAvo 8EMNITP+oHsqavN/nRcFbhMZxUST4V330dxctUr3HoWckOq4AsnH1ZoQSATHxCrFF8pC /1JJgizsDkAHhEzHUt+7zUxWNGZStCKwT6U6zTtM4ZzTyHcjpZc10K4vo5JXaT2KnUIc J3Cg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YNrtEUQH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-44686-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44686-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id t11-20020a05622a148b00b0042ab6a418b2si1377385qtx.666.2024.01.30.05.16.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 05:16:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44686-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YNrtEUQH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-44686-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44686-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3CAE81C2769E for ; Tue, 30 Jan 2024 13:15:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 66BEE7318D; Tue, 30 Jan 2024 13:14:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YNrtEUQH" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9319F6F073 for ; Tue, 30 Jan 2024 13:14:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706620473; cv=none; b=Oy4j3Pew2Bwjnpup0swu8dedAJlez0JPp1L2cJchAtnuX2QzSyuP2ooK2YMwoJiCTSC9lrKwEwToUsh/sQWxd0mOTHdSiR9K3iQP+1viC0tlfGF6cHRRqspHbf1mosFKxBVQ0/M6aGm/I6gQSmWw6hjC2DE6HDGm6EgWuNx91qk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706620473; c=relaxed/simple; bh=g+mDwC9FPU+XmcCzxUJ4hYXHnkp5fd/Hyf0d6FKB8Rg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PSeTKEbyZrCtN+I66Hozh+RPKDxwz47m1/AU4hHvzIbhqLq1P0qSOpc0gpw9sThFAbCgiZVAs56+24yUytE81xIK++ogyFAaVMHa/R/bw+GR8we5Vpa01816pYQign2clzl87dKbZYVEtSbtsM2yUP1avZIYxoqcZ2XfkIxi35c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YNrtEUQH; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1CF9BC43394; Tue, 30 Jan 2024 13:14:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706620473; bh=g+mDwC9FPU+XmcCzxUJ4hYXHnkp5fd/Hyf0d6FKB8Rg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YNrtEUQHPV4xlePXQ6bNoPbZUy0QY/ygNg91OYFhS3FGt7U8wGld+bVHMvTz9l3LE doiIaK5zw+jr/I8PRnw4XKDB9aVDgs/U2UcYq7aY2WwTrblQyXf1bbL0NTRWDEq35n gdp2a8c0Fjd/8W7n+KYY9LLuYKQLcGRcrd/jCCzPTohOsmUxT1EJS8hyEEpfueRpzR BLDAx6QffUjuSONcVLGKjW4hbeQFiWuBhLlrkAmD72bkqAu4Gin9FPcN0bD4IPNJqg l7vpgDKDOEUfJ/Q88D+Ym1r9C/WJr06Wx2fui6ugjuhMfnqRsvG4U+BRdQQYRYyqug HFuO6TF4MSF2w== From: alexs@kernel.org To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org, ricardo.neri-calderon@linux.intel.com, sshegde@linux.ibm.com Cc: Alex Shi Subject: [PATCH v2 6/6 RFT] sched/fair: change sched asym checking condition Date: Tue, 30 Jan 2024 21:17:08 +0800 Message-ID: <20240130131708.429425-6-alexs@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240130131708.429425-1-alexs@kernel.org> References: <20240130131708.429425-1-alexs@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Alex Shi Asym only used on SMT sd, or core sd with ITMT and core idled. !sched_smt_active isn't necessary. Signed-off-by: Alex Shi To: Ricardo Neri To: linux-kernel@vger.kernel.org To: Valentin Schneider To: Daniel Bristot de Oliveira To: Ben Segall To: Steven Rostedt To: Dietmar Eggemann To: Vincent Guittot To: Juri Lelli To: Peter Zijlstra To: Ingo Molnar --- kernel/sched/fair.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 6680cb39c787..0b7530b93429 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9744,8 +9744,8 @@ static bool sched_use_asym_prio(struct sched_domain *sd, int cpu) if (!(sd->flags & SD_ASYM_PACKING)) return false; - return (!sched_smt_active()) || - (sd->flags & SD_SHARE_CPUCAPACITY) || is_core_idle(cpu); + return (sd->flags & SD_SHARE_CPUCAPACITY) || + (is_core_idle(cpu) && test_bit(cpu_core_flags(), (void *)&sd->flags)); } static inline bool sched_asym(struct sched_domain *sd, int dst_cpu, int src_cpu) -- 2.43.0