From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from BN1PR04CU002.outbound.protection.outlook.com (mail-eastus2azon11010035.outbound.protection.outlook.com [52.101.56.35]) (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 4B6FA4BCAC4 for ; Wed, 6 May 2026 18:15:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.56.35 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778091319; cv=fail; b=WMH5uQD1wZnFc7yXhpoQH5bFkooCyfsHaI530WequpShaZnZWzLe5tk/k8x4kkTGiXBw+cAoGLUGCO4xdBiNeyMjp//lvH2H7bP2/RsUtfRq8l5yrxfLt/qwggzrY5FuHO7iyNUAjgm8xJGy3vUdpuGgpEC92jZvN4ZKcMlww+s= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778091319; c=relaxed/simple; bh=wmgRrv7xlbCaZVurHXgk/dkyABigYUjLloTigaJcV7k=; h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=LNEgM1NOUd/ywgWMiHr1mlB8FCz941iNGCWXuge3KbFC9X/eYApwZ+JL9R+y64IpoMv36h0s17k6r06LjMwWoFOCw86x+uI+xTWVj3R97WzaHBmlylanIkoFAB+PcGm1zIBaiWbWOXu2Pl8jVvE9seJl0ZRWovEWkdTQmY8Weok= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=fw6KUPuq; arc=fail smtp.client-ip=52.101.56.35 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="fw6KUPuq" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jtW4Prk5QcD81L44Ld8zc3dP41PEqUqxA00FGxLyDkq/SuhqMwG+Ft7URuzXk5I3nlIfrjFuj+MqLHiSvvrD8UR/u7BWrOMvBpOF0NqMloJv97bIZKe3HJOYPytdlKWDvDtm3IVDfse1coqSA6qRp2Q0dXPtnqrXJPKuTl6Ry+IEWVB99uIwUecqLCJQf9AL9Nc0F+N7zh1gKs2LiAcFisomK+jiZO2bZ4Kf5Fv+zWUiD5pccMVtCXjs8nx3a+Rsour5BCV6yFPKl+kkxSO5gB+AehWMAzYRtQS6VPpoDgcbW1wwaHcc7bF5xE+O/sXanIC4BhyhyrdBTOyVSqcsEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=myrEPPCuvk4S4HZICNvm/DcDr4U3Rhz1m9v/kQMtWdc=; b=ogu63jZluWmU/H5JssUOENoAKS7R6bIz6ZV8gj/g5/j0xlwwwsgF6YEj/88umRG5lB5+aJa6uAUTI0vLjX5k+fhXh5+bNQBQB+09Cw4WhB+pw0vOmj/DCXnHI+ycjVkBoxQwpi7E1JJsS/FvFdtQexXrUWlhcXiJ6WWCZIupkvE7AyC7B7MjtB1BPSOwKGYwvq+nVDd+oVe4iC+Zx0jRXpUXXrtDC2wnC/tkv/Q7giT42ommjCOiwLoXK+q6EV+gHONVedC105ktoU7vvb61SJehljGKfc+HcIBI0OZp32KQMNvJks7SqCsVPoN0yZfuGaqp5lK+RHVASQKcr96lww== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=myrEPPCuvk4S4HZICNvm/DcDr4U3Rhz1m9v/kQMtWdc=; b=fw6KUPuq569P68KYtFzyF736xkOZMO1Yxk8bTJVPQx8Bny2YfraIZyyPVRvPqwh9UgGCG93QB7pFxU8BL+7X3R5XARcrdun7e6UWGoh6cWRo2eVeCY0aDPYRy5biYH8MGwM3HKE/BRwqGBRSzqZJsDYwE9RwFByw7utahVW1+X68tb6QOPFI8khTi+d0IIUzsP/izsegM++4+bCrSB04iom2Pjpzldhn0grhgtnW2hInZ5N/aF4nZZPuDVsT+YgDqoWkBxtua6JKuysJF7TzJgUF8ZOtrS7A63d/Z+CDr2wudUpEt0xVCmXBylyrPqAbI+758czndABkvjav1mgvdQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from LV8PR12MB9620.namprd12.prod.outlook.com (2603:10b6:408:2a1::19) by DM4PR12MB6061.namprd12.prod.outlook.com (2603:10b6:8:b3::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9870.25; Wed, 6 May 2026 18:15:06 +0000 Received: from LV8PR12MB9620.namprd12.prod.outlook.com ([fe80::299d:f5e0:3550:1528]) by LV8PR12MB9620.namprd12.prod.outlook.com ([fe80::299d:f5e0:3550:1528%5]) with mapi id 15.20.9891.008; Wed, 6 May 2026 18:15:06 +0000 Date: Wed, 6 May 2026 20:15:01 +0200 From: Andrea Righi To: Vincent Guittot Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , K Prateek Nayak , Christian Loehle , Koba Ko , Felix Abecassis , Balbir Singh , Joel Fernandes , Shrikanth Hegde , linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/5] sched/fair: Prefer fully-idle SMT cores in asym-capacity idle selection Message-ID: References: <20260428144352.3575863-1-arighi@nvidia.com> <20260428144352.3575863-4-arighi@nvidia.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: MI2P293CA0004.ITAP293.PROD.OUTLOOK.COM (2603:10a6:290:45::15) To LV8PR12MB9620.namprd12.prod.outlook.com (2603:10b6:408:2a1::19) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: LV8PR12MB9620:EE_|DM4PR12MB6061:EE_ X-MS-Office365-Filtering-Correlation-Id: 63b7385a-4c23-4c9c-9ec0-08deab9b669c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024|7416014|18002099003|22082099003|56012099003; X-Microsoft-Antispam-Message-Info: 2NSTG+wGpknYt8TFMn2xCwlDJU+QXlNeN7B+qubUGsnxokMAPoi555Gf2S5zUN7LjgZzGW8og0dfWgo6ombFffuMsqF7xIWFEofY9s+fj7zsuNvwBWWw5LVUlmZHnv3a/qkbwXT2YFD+0Wu8wd4lxbXjjQwVH03scydqwhebYgkp/j8z+oKMN5cDKM+ov5BkdbSZSK54XnGiniNh9Pm1d7jm02yAufaghtPdBwrgzgfOMHcQ0RbXMEAhkFhdpm7YBf2JHht6mfEjj0GFfrYniK9L+Emc8UpaTYKTuwgWHnaj4oPjwTlalav2rqM0zakuI60Lz7u89bWyXGNW1WMGdQSDfk5X91j/BsWqJ/WQ58HnsVMG1exCdp8p1vKqeYi7h3blhp4XO/HbbUFz19hdy0OUhB7TKYFMj9pYWE4siNNvMNKfGiM0WuWn9JNscEWz14pDbbdmWM3IUP2uDnfa4nb4YregQzmRtgojOmiU9n2l2xgkR0dLVnc1UNDrB0rBO8LwSj3XuL+O5i02FbBXYt4H0wgCS00DDK+JuR17+ey9PNbMJgT6I0DwusMNsHDSqEar1s/vgGScE/dkI20dsdhPdJf6gROh/oy/cNVz60d7YhDF2XlgGBPKsbOHFTk5fLeZOPUbD5BvuWbWFN1cBQE8YmJjvLU0pgBcSr5NGCyuOL5OkFIMF5uSwlAh9jA2 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV8PR12MB9620.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(376014)(1800799024)(7416014)(18002099003)(22082099003)(56012099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?J3wrwwElid10ucF1sACMEGLUIqaP/8IsoDxgfqlqSIuThju2XERnCdwxBlkZ?= =?us-ascii?Q?QwNcl7G6X7LOEYrHnEkwKynGxstkPQwTP2YlacCT1JVv940pd8hwD69X1m6M?= =?us-ascii?Q?pumioMqryedbQwh1aO/1qaB9J9BCwjWloa6Te+LOrMEnB61v+1PzXuZAaE1/?= =?us-ascii?Q?pFpAfb+HURtC7XW8MiJLec2/KZFIMfWeC3Np9Z/lTM/ZTJcq2GtBscH3k1Us?= =?us-ascii?Q?G8Fd3hvN8i/LDGj45mVMWle+kgS5q20ce++UL35fZgMz6IrVjzskEmofIfDu?= =?us-ascii?Q?HgnNo69qj9Ey0szPYzOV9Mf2cMz9vlt+znLk42S6d/DFx6yvnX5MkyQRhSRz?= =?us-ascii?Q?HaEWD2VAXywECQSmMbqYKteTCB7m89d7NUu5xX2S0DQCirpfUor0M/R8uXH0?= =?us-ascii?Q?lopdzUoTE1Fzxczm8R5ykM+KfS7qqdYJDw99z1fjU6iIb39hPR6VcYbTewiD?= =?us-ascii?Q?aCfbJINf6jvBfN7/QQMtdrGV1xIUtMVTUuDMTeAk+fEvQ4fLwMUGfw60tDGo?= =?us-ascii?Q?l5/gBNL+bzfkX0PQB1kKNGK7otVoXLWAqGOLadfELFbvVK1kiLSzl7Bb9FH4?= =?us-ascii?Q?g5t6e6R7F69b78iiTa+5PF8iQFrvcesXMtJekdNMFSoPiTzdFl7StOAfmzPZ?= =?us-ascii?Q?UQB2RqBcn05+PvSZqpHa/nsvF5jkROaoW210C3lK3wz870uq7Kfe5h8Umo6X?= =?us-ascii?Q?GYCzB6WWhUsmQeusMhqjMEeq1/pdJUtIEomyUsfhSype0kQAXIc59VqbSsBi?= =?us-ascii?Q?eyB899JHqJo3nW6FqzYxFH+RG8YvJ42E/4/Dep8p53X+sqhmbwc6HmgXUalw?= =?us-ascii?Q?MbB4RMJ77NwMbDHuKr/KGrAvUw5IojNZBrd253ukhS1IaSrbJYqXIw+SKgg0?= =?us-ascii?Q?96qvdbEA0233lksvZ2Gdqh+G7mn+6HSF7ePgKsoiZSDk8CxfL5s3Vr1Zi9AG?= =?us-ascii?Q?/SVUfrcrg1ZLjgEwq5fMfa4Z5Mo+I8Ufi5PIbYVQRIkNXMYEaNTJ3kF9z4Aj?= =?us-ascii?Q?D7OrbHr3+Ku0JE2IcHW40Ja8z/3GDAPDlvB8rLCmBEbcaH7U0mG2tR/v2xu1?= =?us-ascii?Q?5t8z0lliagJsmd4w8oHaCimZKAT2weTeyoaC0rXt5vN7qmo0Vl+t7c4rkoVt?= =?us-ascii?Q?gO38QghzxH0G/UX2Cj3BT4xmr1LBESjc5/y6P9FsEEyfGUBjgHJg6bq5qpiT?= =?us-ascii?Q?1mU1bfpOU3r5nmR5YOyEJxw4rr4pBux4RVqkehthyFfh32lcvc9WJHJT/Wy/?= =?us-ascii?Q?IR0+NtRrRpoqCcZBQ55uP+z/01LL/Y6udpq+iYUmCblqEnnaWGofkJTu/Khn?= =?us-ascii?Q?ctglW0qVtIM6M4uageYJr7yWhNXMUPvLqdMuwOlockSGMoOi4olTxXIKpMgp?= =?us-ascii?Q?yHArTYtUZphQra/JBsk3yvUMo6/Dkr3N4gCTFS1wMSACsxXue1nCPDeyxM35?= =?us-ascii?Q?abfwPOSxOaJInLJzuo2ygsudj4IRF8HsXGbLta5K/P9dWT18o7kzk/Bem40R?= =?us-ascii?Q?i098jsvdTdcEqv6vQIbz7knPedSSXcNZO18JdN84BEQU3q6eXD2q9i+ZXi05?= =?us-ascii?Q?aV55F8fq58WPI8fp9QrUQoUeRI0tVuggLwVKFD2a0+Vr5On5oR8l/ovGkYtL?= =?us-ascii?Q?0g2LsNbZw1SULlfw2pU2mFZcEuNaZD0zg8s4s4Wn1u9GYZFlkBv6XL5GUAgl?= =?us-ascii?Q?WMDjRjpgMyJoctz+RixCTeqgmsKWDFIMsN0bQ2ucFcZsNIdeAwXFBwBDAbM0?= =?us-ascii?Q?1prYpTY3eg=3D=3D?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 63b7385a-4c23-4c9c-9ec0-08deab9b669c X-MS-Exchange-CrossTenant-AuthSource: LV8PR12MB9620.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2026 18:15:06.6702 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: QtD7+VoFawJBSoHwBG8RMrdFsxac/fxZihNgyEv4jfab395gmee0a3p+sKlomD7Dxy/mjmuDzGt78+D0RgtIAw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6061 Hi Vincent, On Wed, May 06, 2026 at 12:29:10PM +0200, Vincent Guittot wrote: > On Tue, 28 Apr 2026 at 16:44, Andrea Righi wrote: > > > > On systems with asymmetric CPU capacity (e.g., ACPI/CPPC reporting > > different per-core frequencies), the wakeup path uses > > select_idle_capacity() and prioritizes idle CPUs with higher capacity > > for better task placement. However, when those CPUs belong to SMT cores, > > their effective capacity can be much lower than the nominal capacity > > when the sibling thread is busy: SMT siblings compete for shared > > resources, so a "high capacity" CPU that is idle but whose sibling is > > busy does not deliver its full capacity. This effective capacity > > reduction cannot be modeled by the static capacity value alone. > > > > Introduce SMT awareness in the asym-capacity idle selection policy: when > > SMT is active, always prefer fully-idle SMT cores over partially-idle > > ones. > > > > Prioritizing fully-idle SMT cores yields better task placement because > > the effective capacity of partially-idle SMT cores is reduced; always > > preferring them when available leads to more accurate capacity usage on > > task wakeup. > > > > On an SMT system with asymmetric CPU capacities, SMT-aware idle > > selection has been shown to improve throughput by around 15-18% for > > CPU-bound workloads, running an amount of tasks equal to the amount of > > SMT cores. > > > > Cc: Vincent Guittot > > Cc: Dietmar Eggemann > > Cc: Christian Loehle > > Cc: Koba Ko > > Reviewed-by: K Prateek Nayak > > Reported-by: Felix Abecassis > > Signed-off-by: Andrea Righi > > --- > > kernel/sched/fair.c | 70 +++++++++++++++++++++++++++++++++++++++++---- > > 1 file changed, 65 insertions(+), 5 deletions(-) > > > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > > index bbdf537f61154..6a7e4943804b5 100644 > > --- a/kernel/sched/fair.c > > +++ b/kernel/sched/fair.c > > @@ -7989,6 +7989,22 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, bool > > return idle_cpu; > > } > > > > +/* > > + * Idle-capacity scan ranks transformed util_fits_cpu() outcomes; lower values > > + * are more preferred (see select_idle_capacity()). > > + */ > > +enum asym_fits_state { > > + /* In descending order of preference */ > > + ASYM_IDLE_CORE_UCLAMP_MISFIT = -4, > > + ASYM_IDLE_CORE_COMPLETE_MISFIT, > > + ASYM_IDLE_THREAD_FITS, > > + ASYM_IDLE_THREAD_UCLAMP_MISFIT, > > + ASYM_IDLE_COMPLETE_MISFIT, > > + > > + /* util_fits_cpu() bias for an idle core. */ > > + ASYM_IDLE_CORE_BIAS = -3, > > +}; > > + > > /* > > * Scan the asym_capacity domain for idle CPUs; pick the first idle one on which > > * the task fits. If no CPU is big enough, but there are idle ones, try to > > @@ -7997,8 +8013,9 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, bool > > static int > > select_idle_capacity(struct task_struct *p, struct sched_domain *sd, int target) > > { > > + bool prefers_idle_core = sched_smt_active() && test_idle_cores(target); > > unsigned long task_util, util_min, util_max, best_cap = 0; > > - int fits, best_fits = 0; > > + int fits, best_fits = ASYM_IDLE_COMPLETE_MISFIT; > > int cpu, best_cpu = -1; > > struct cpumask *cpus; > > > > @@ -8010,6 +8027,7 @@ select_idle_capacity(struct task_struct *p, struct sched_domain *sd, int target) > > util_max = uclamp_eff_value(p, UCLAMP_MAX); > > > > for_each_cpu_wrap(cpu, cpus, target) { > > + bool preferred_core = !prefers_idle_core || is_core_idle(cpu); > > unsigned long cpu_cap = capacity_of(cpu); > > > > if (!choose_idle_cpu(cpu, p)) > > @@ -8018,7 +8036,7 @@ select_idle_capacity(struct task_struct *p, struct sched_domain *sd, int target) > > fits = util_fits_cpu(task_util, util_min, util_max, cpu); > > > > /* This CPU fits with all requirements */ > > - if (fits > 0) > > + if (fits > 0 && preferred_core) > > return cpu; > > /* > > * Only the min performance hint (i.e. uclamp_min) doesn't fit. > > @@ -8026,9 +8044,33 @@ select_idle_capacity(struct task_struct *p, struct sched_domain *sd, int target) > > */ > > else if (fits < 0) > > cpu_cap = get_actual_cpu_capacity(cpu); > > + /* > > + * fits > 0 implies we are not on a preferred core > > + * but the util fits CPU capacity. Set fits to ASYM_IDLE_THREAD_FITS > > + * so the effective range becomes > > + * [ASYM_IDLE_THREAD_FITS, ASYM_IDLE_COMPLETE_MISFIT], where: > > + * ASYM_IDLE_COMPLETE_MISFIT - does not fit > > + * ASYM_IDLE_THREAD_UCLAMP_MISFIT - fits with the exception of UCLAMP_MIN > > + * ASYM_IDLE_THREAD_FITS - fits with the exception of preferred_core > > + */ > > + else if (fits > 0) > > + fits = ASYM_IDLE_THREAD_FITS; > > + > > + /* > > + * If we are on a preferred core, translate the range of fits > > + * of [ASYM_IDLE_THREAD_UCLAMP_MISFIT, ASYM_IDLE_COMPLETE_MISFIT] to > > + * [ASYM_IDLE_CORE_UCLAMP_MISFIT, ASYM_IDLE_CORE_COMPLETE_MISFIT]. > > + * This ensures that an idle core is always given priority over > > + * (partially) busy core. > > + * > > + * A fully fitting idle core would have returned early and hence > > + * fits > 0 for preferred_core need not be dealt with. > > + */ > > + if (preferred_core) > > + fits += ASYM_IDLE_CORE_BIAS; > > It might be good to add a comment stating that if the system doesn't > have SMT, prefers_idle_core and preferred_core are always true. > > This is okay because CPU == Core in this case but the value differs > from the default 0 or -1 of util_fits_cpu Ack. > > > > > /* > > - * First, select CPU which fits better (-1 being better than 0). > > + * First, select CPU which fits better (lower is more preferred). > > * Then, select the one with best capacity at same level. > > */ > > if ((fits < best_fits) || > > @@ -8039,6 +8081,19 @@ select_idle_capacity(struct task_struct *p, struct sched_domain *sd, int target) > > } > > } > > > > + /* > > + * A value in the [ASYM_IDLE_CORE_UCLAMP_MISFIT, ASYM_IDLE_CORE_BIAS] > > s/ASYM_IDLE_CORE_BIAS/ASYM_IDLE_CORE_COMPLETE_MISFIT/ > > ASYM_IDLE_CORE_BIAS is an offset to move an idle core that doesn't > fully fit in the preferred range [ASYM_IDLE_CORE_UCLAMP_MISFIT, > ASYM_IDLE_CORE_COMPLETE_MISFIT] > > Keeping in mind that ASYM_IDLE_CORE_BIAS == -3 == ASYM_IDLE_CORE_BIAS Ah yes, using ASYM_IDLE_CORE_BIAS is just confusing, we should definitely use [ASYM_IDLE_CORE_UCLAMP_MISFIT, ASYM_IDLE_CORE_COMPLETE_MISFIT]. Will fix this. > > > + * range means the chosen CPU is in a fully idle SMT core. Values above > > + * ASYM_IDLE_CORE_BIAS mean we never ranked such a CPU best. > > s/ASYM_IDLE_CORE_BIAS/ASYM_IDLE_CORE_COMPLETE_MISFIT/ Ack. > > > + * > > + * The asym-capacity wakeup path returns from select_idle_sibling() > > + * after this function and never runs select_idle_cpu(), so the usual > > + * select_idle_cpu() tail that clears idle cores must live here when the > > + * idle-core preference did not win. > > + */ > > + if (prefers_idle_core && best_fits > ASYM_IDLE_CORE_BIAS) > > s/ASYM_IDLE_CORE_BIAS/ASYM_IDLE_CORE_COMPLETE_MISFIT/ Ack. > > > + set_idle_cores(target, false); > > + > > return best_cpu; > > } > > > > @@ -8047,12 +8102,17 @@ static inline bool asym_fits_cpu(unsigned long util, > > unsigned long util_max, > > int cpu) > > { > > - if (sched_asym_cpucap_active()) > > + if (sched_asym_cpucap_active()) { > > /* > > * Return true only if the cpu fully fits the task requirements > > * which include the utilization and the performance hints. > > + * > > + * When SMT is active, also require that the core has no busy > > + * siblings. > > */ > > - return (util_fits_cpu(util, util_min, util_max, cpu) > 0); > > + return (!sched_smt_active() || is_core_idle(cpu)) && > > + (util_fits_cpu(util, util_min, util_max, cpu) > 0); > > + } > > > > return true; > > } > > -- > > 2.54.0 > > Thanks, -Andrea