Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp268386rdb; Wed, 17 Jan 2024 00:58:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IGlaWeZB1OUMrO5r0xthoOHtHtffs6azClEsLUNPxVwdxY959Mo9fmNYEziUduWfchWAWS+ X-Received: by 2002:a17:907:7ea9:b0:a28:e2b7:1b96 with SMTP id qb41-20020a1709077ea900b00a28e2b71b96mr2494319ejc.156.1705481909358; Wed, 17 Jan 2024 00:58:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705481909; cv=pass; d=google.com; s=arc-20160816; b=GomL8hG8EBR/VLPm1lHQbObiiMCUsGWMv0taIctFIqbTZwHv3TO3vUlJd/4XbNqYBq 9m7B1S1H4VChJ5ayqTP7Iai/mkTc7rHgxDH0afOzb2GvXxFMt/xE5pyJmBRTe7lfMIj9 dxfGT8QIQ4qLbW5Vwt8t9VsPbrlG+0GL2Qp6BZzr2TusyPJ823DbliejRKZ/TllmcqPz NhurHFHRtFeJEK/uPehRPQvsIFcTHO7YFwsWTQ8HOuDjZo08Ji6eg/rv4aH3tUm+rVcx pBl9sUcHXo/2R9Lhk6wv/CGjCtwgSXEKAXzsD5h8gUyXXlSj92TSHN79/KeJnkZqShrQ lRXw== 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=8eaXaN9W+z+RV/+Wvdn/qMOUZFlsDMjbR+i4I7SQbyM=; fh=2ooNcWiF1wbXc4MOpItQ0J3HmpaFWSgX1s64XQR6nBA=; b=zlLGL4ofyb8wep9gp7f262SYt4uOVp9mLLr6qeQmXQT0MtFwqnhI7UzshFH0/cf1VE zp5bzrkytmBIOwMFXjwP4DZenV8UWR5FWs9kXMZ2qqwB/ga1jJwkE2i46VfLHWEAOkt6 z7sVFkHqBA8qgNa0WoIkp+pRRnrptNdoOazr4OusYyQIYhrkrKUWx2z06XxDdG1UrkZX 3Z7rkGCYku1+3jjyCi781GcqzqaoK9O/AYOy+JQPVctiJ9xHB5Gd0hDyGU6SAP3zZFSQ DCDhHO8L3U+u0dnk5i0FAmE8IpTj8b5Fue2+qnXZ8fbGBt2bQfZJJnZBwM2mYGq3g5Rk mAFw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZW3q9q3g; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-28676-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28676-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id p5-20020a1709061b4500b00a2d357afac6si3568883ejg.300.2024.01.17.00.58.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 00:58:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28676-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZW3q9q3g; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-28676-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28676-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 056231F266CD for ; Wed, 17 Jan 2024 08:58:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 38E261E89E; Wed, 17 Jan 2024 08:56:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZW3q9q3g" 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 64C891E896 for ; Wed, 17 Jan 2024 08:56:11 +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=1705481771; cv=none; b=YF4LAzmCvA8ZcNHMG52drTD9AT/V4jlugn5j3PPSv8/BuGIhJJAfIMOVgtjag0UJp9Qxlb1dH/sPcYZiy/q29l0znThlNG6ZmzPFc7LhWkaICSiG2htjXhqnQkJqvbq8Hw02uZOQZje+99ZVLFi0Z9JViaSLQThU6gG338TX+LQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705481771; c=relaxed/simple; bh=KrafdORBylWfUZyJJ7GTGl+pw7Wfz9BmDb03nqcDl7U=; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; b=gSTEsXpa0FXSOkVnJVmsptvsOFW+uDsDS7AhVSPuGRN0MmKklwU5tDky9duq+lW0c5O3VF0zDx6atdE80e7BaJo6zexBxoCFCPe2dh5quemvcEUD1zulCnoQXARFScRZEvIY45iNpln+lUbe9Q1bbb4GYI3dBJqk4C4bopIxt4A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZW3q9q3g; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A774C433A6; Wed, 17 Jan 2024 08:56:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705481770; bh=KrafdORBylWfUZyJJ7GTGl+pw7Wfz9BmDb03nqcDl7U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZW3q9q3g3FVDOfQNzQyNTbYXWYxPM4BmMJwsrIRyGMLhqJX81cvqJA8rzuao26L1r WWOJN1kdq8QpuIwZwSV6F+9ouxFdYmIV7ETzuKWJb0XEfyW9yfHd8+R7/F+Huo2Pb8 qvZMrJr+YGJqDXJTIzHPtcuk+2HM1wIeq/6SUhvqyVJ/8osFSJlaQdI98Sv6p7vvgT RvuXjP/YsimmZlUFglqCQqWzyNPc+/xpxSbBhNz4lkeTEtZCS+IXaS7uu9dtfxZ6iS TVLMT2HwyAPkvTKmpuifYrims9L2gy7ffAAKQLqaqKJ58B4VMIJ7PTCHoazTyKPvtR c7j/SMzXvyYsA== From: alexs@kernel.org To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org Cc: Alex Shi Subject: [PATCH 5/5] sched/fair: narrow the sched_use_asym_prio checking scenario Date: Wed, 17 Jan 2024 16:57:15 +0800 Message-ID: <20240117085715.2614671-5-alexs@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240117085715.2614671-1-alexs@kernel.org> References: <20240117085715.2614671-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 Current function doesn't match it's comments, in fact, core_idle checking is only meaningful with non-SMT. So make the function right. Signed-off-by: Alex Shi To: Valentin Schneider To: Vincent Guittot 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 96163ab69ae0..0a321f639c79 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9741,8 +9741,8 @@ group_type group_classify(unsigned int imbalance_pct, */ static bool sched_use_asym_prio(struct sched_domain *sd, int cpu) { - return (!sched_smt_active()) || - (sd->flags & SD_SHARE_CPUCAPACITY) || is_core_idle(cpu); + return (sd->flags & SD_SHARE_CPUCAPACITY) || + (!sched_smt_active() && is_core_idle(cpu)); } static inline bool _sched_asym(struct sched_domain *sd, -- 2.43.0