From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from SN4PR2101CU001.outbound.protection.outlook.com (mail-southcentralusazon11012009.outbound.protection.outlook.com [40.93.195.9]) (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 9E58C2DB7BA for ; Fri, 24 Apr 2026 05:37:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.93.195.9 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777009037; cv=fail; b=duZhC8bZqDfFeyys+W91dMFQYt2B7SaTjJ2LOg1hlZetMtaAYc2uMzBgoEsURKNGkhKVOhw853Q9GkHwkTyhi60jQCIilEprNHaB/Mq5AbQo86hj0qXyufTsvhcAIR0ZpeSuHiYRwQrzLojA8b3ff0Yp6W3kLaNexQK8kYCjZaI= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777009037; c=relaxed/simple; bh=JVrHdPSyjY1QzPMtR1HLEeYENa9Qh/gkQardolrzm+I=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=ewsuj/3OFvd67qh6gWAy9tm/ATviVufc1WdrttRy/fKN4jivQUnCcv8BRGLqlTXREAyhIQ4kF4Rhcc/9BGWjIAA+OeNlG+5ItnVGtU3N89b+8OwEnSDoqXZcv5BXBg9roPv9SR2hHovgE3q1ljkKJvv6uW8yLVTfV2jBYEomiBg= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=2MPi9Lnp; arc=fail smtp.client-ip=40.93.195.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="2MPi9Lnp" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jaGCum+iSTbtONVt26260AxDwWPo+OTQR19wauDNAAQ1x1Qo/nFALNl5PKMvSNoxrGPfC0ROSLZ13FW6PSTCVqMt/Y8pbI56emPsU728vNB/VqqjGdMNjaU8MHzbB1B5vWavEbUtU7OqjWCRLcXCl3lWuqCeOuj/8KDWXFOWIK8NuFSHMbIcSKHdAR3+UOxAMkZLB1eyYPtzE3OvY3XiebWxA9Ml4qe7/rA/tjthDe5AXVCCynLKOtaa6NC3J3+Vf3Mit1b3iKwxrGpRqvj+lJPdUMDlzhTBdOrI80ysijv2s4TLGgx6zhSzjHbF8PiibNzsWh8DDn1HMgnGXU5tTA== 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=23JNACUIj6bjsWmsE2UDuIPoJOvReeneG9bPoQ0xc7o=; b=w/26a+K7fNl6DBc0KYc3Dkv2kVh7nX7IX4wdcmkr0QWbWGxDGAjFdb2jYoZTH+SxbSka2rObzRzFzyxQsCddtudR1yWTGIf+JWrondgHZoh63uAEsJ2/d41wl0xJ/1vUv2j1J0psGpcjrvi3Nr2fV6UrQv2GqK5wsz4bhIKitSW14hAbwQAYjegeD3QWhwLyktOB8cd3yWQQkHGuSVe+fpqv3X9dEYeeAJmAhGi1CH06Fx28jxjm7RrOHTas92O1FdOpZwlKlXDY+1jT/R2JnR/wz3xRza02iaKwZBQvPkW92fy7f11cFkAA25CeX5RQhQqH90VnlXsbQ+mHtsvkLQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=nvidia.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=23JNACUIj6bjsWmsE2UDuIPoJOvReeneG9bPoQ0xc7o=; b=2MPi9Lnpc/oLVX0NEIRn5r/eMG34axVjXSE0x0qwN7N+f+OZPFdp1EWk8lX5qCfLRMUQmbDLRBRVqQrNqLgYy8iH71c+mxR9QhGCknjlgKkHvKV6OUc7m00icz5tb2ixP9UCYuYXtPRqsRRXj6Sl+EwAh2qinmElf8hgtWf8MLA= Received: from BL1PR13CA0351.namprd13.prod.outlook.com (2603:10b6:208:2c6::26) by LV2PR12MB5800.namprd12.prod.outlook.com (2603:10b6:408:178::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9846.15; Fri, 24 Apr 2026 05:37:07 +0000 Received: from BL6PEPF0001AB74.namprd02.prod.outlook.com (2603:10b6:208:2c6:cafe::f8) by BL1PR13CA0351.outlook.office365.com (2603:10b6:208:2c6::26) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Fri, 24 Apr 2026 05:37:07 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb07.amd.com; pr=C Received: from satlexmb07.amd.com (165.204.84.17) by BL6PEPF0001AB74.mail.protection.outlook.com (10.167.242.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9846.18 via Frontend Transport; Fri, 24 Apr 2026 05:37:07 +0000 Received: from satlexmb10.amd.com (10.181.42.219) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.17; Fri, 24 Apr 2026 00:37:07 -0500 Received: from satlexmb08.amd.com (10.181.42.217) by satlexmb10.amd.com (10.181.42.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.17; Fri, 24 Apr 2026 00:37:06 -0500 Received: from [10.136.34.119] (10.180.168.240) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server id 15.2.2562.17 via Frontend Transport; Fri, 24 Apr 2026 00:37:02 -0500 Message-ID: Date: Fri, 24 Apr 2026 11:07:01 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/5] sched/fair: Reject misfit pulls onto busy SMT siblings on asym-capacity To: Andrea Righi , Ingo Molnar , "Peter Zijlstra" , Juri Lelli , "Vincent Guittot" CC: Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Christian Loehle , Koba Ko , Felix Abecassis , Balbir Singh , Joel Fernandes , Shrikanth Hegde , References: <20260423074135.380390-1-arighi@nvidia.com> <20260423074135.380390-4-arighi@nvidia.com> Content-Language: en-US From: K Prateek Nayak In-Reply-To: <20260423074135.380390-4-arighi@nvidia.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB74:EE_|LV2PR12MB5800:EE_ X-MS-Office365-Filtering-Correlation-Id: ea11f90f-a5d8-459c-e2cf-08dea1c38638 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|36860700016|1800799024|376014|7416014|56012099003|18002099003|22082099003; X-Microsoft-Antispam-Message-Info: oPz8toS4N3AMJP4xGGamNUUZhUOnNOowTpaZEB1auswwD0spOHsCW7letzcorWJTOOnieU5Lx7Oi6NZTMciK3Kvvm+fP1a/VEQiqjEYhC8RqzcSJitonaiZlttz/LW0hSse462g9JDPe/+6NXvinVdXTthqoGyWbmaigyLilXUYWqNFh/axScIxry+rvtjJECy28dCEJx1KY3ixZZ7bRHcjPkNRmUvTP+fSaE5PKy7DcdCn5bWyRgLRdxCxKLHxjHgVOxhn0LuyT9dgkj5Vnm0Qrw90L7+BClOcGi514tW1pPkWdD6jzrF6D/V5DbaWQjaXSJX8lRtx9w2SQtPh2ZSNnnXsD6QQm7YXzFmvi0dfsKnMy/VEQU54tfqMEBgifQZqecYmzIwNNtuP36G/dgdC1WOOdFd26Hug5KnObqkPtTr8ZD+U30c8YZiqrrqE7cldstoV+32sXhAXnbkU335uW9DcayGu53br32sLKYwegWAxqbXDPPq3RZX0WreqaKjShb57NIEnmWAoVfy0gcxUQq7040Yw9uPIJFhwolMoPIj/QH5iMfJriAU5gheNqOmnajJ31Je6I1epityGeNJO+UWyFm9feTjHfKWeDb1rUk8SA8OCF/4NXtFA02Klvz6n0xj1AoQXqm8BtjDVjSjSdtHKsFXjYTnzDr95JmWArxdKpd7i0qeOV61gUE1fBkbLZt3Efl3yaOBUNkA3pJN/xcClcD/e9KoOMF/6gessNr3IZcWxZvcP53yGtfAM68ZPMzEhcIZq4EPZ1DC0kOQ== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb07.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(36860700016)(1800799024)(376014)(7416014)(56012099003)(18002099003)(22082099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: DUy8m/RWrpjKM1BnNuL1kf/ignUome6LwaCrzRHR5I1Z8CfYAufRk+Cp8VBRpFbW5HWrtigTDHciL1RXIfgeeCeobvB+KEol+tIXfu/L9LWvzxh3SvNqXudQ+R9dk2cQSIN3jKKjYZPwWVaebNHvapfIBcjp3Wie55BcwNQLGavxQY7F2iMR+0rAeGHOfsYUhQi9a3ktS3CeykT1qYnG3wwgJAecC+xN/fZGQgbSD8D+5D1fQv5+5EWPAViWHYQPM+6uP1nUsWdbLP5uk/y0YhdymZmQCyRXisEup2qHw+HqXQs6+xJEyFhL2VjCnkjNtvaqt1GElQlX+2PqrhQ5B45NuqFWwOsPSqraxxr/gX2l/cqnKBD5KyCtMhuLQODENnhmqH/k56kTSoirKAW0FGg3wTqWdnccbfi6nm3aSRAQKijUrYsU7oJq1a6xU3GI X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2026 05:37:07.5285 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ea11f90f-a5d8-459c-e2cf-08dea1c38638 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF0001AB74.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5800 Hello Andrea, On 4/23/2026 1:06 PM, Andrea Righi wrote: > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -10815,10 +10815,16 @@ static bool update_sd_pick_busiest(struct lb_env *env, > * We can use max_capacity here as reduction in capacity on some > * CPUs in the group should either be possible to resolve > * internally or be covered by avg_load imbalance (eventually). > + * > + * When SMT is active, only pull a misfit to dst_cpu if it is on a > + * fully idle core; otherwise the effective capacity of the core is > + * reduced and we may not actually provide more capacity than the > + * source. > */ > if ((env->sd->flags & SD_ASYM_CPUCAPACITY) && > (sgs->group_type == group_misfit_task) && > - (!capacity_greater(capacity_of(env->dst_cpu), sg->sgc->max_capacity) || > + ((sched_smt_active() && !is_core_idle(env->dst_cpu)) || update_sd_pick_busiest() goes over all the groups of the domain but the "env->dst_cpu" remains the same throughout. Maybe you can cache the status of is_core_idle(env->dst_cpu) in lb_env at the beginning of update_sd_lb_stats() and save on repeating the is_core_idle() test here? Sure, the status can change while this CPU is load balancing but in that case the sibling going idle will start newidle balance and it should see the correct status and do the right thing on behalf of the core. > + !capacity_greater(capacity_of(env->dst_cpu), sg->sgc->max_capacity) || > sds->local_stat.group_type != group_has_spare)) > return false; > -- Thanks and Regards, Prateek