From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from BYAPR05CU005.outbound.protection.outlook.com (mail-westusazon11020136.outbound.protection.outlook.com [52.101.85.136]) (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 756993563C4 for ; Wed, 11 Feb 2026 23:19:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.85.136 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770851999; cv=fail; b=oPCRhB1rikruzZIY353a/2GesvGIMzrg1W9TBKgdcbjYa/vpiF12lCwS+oiruKScNR3ITmw2eABCnwBYWVH7nAo7WWqd0jGpvmEuXPhUM2o449DTSmQibQOtYlDdU6X8QXs4JZaoTNvK2v4X+3e0wzCQ8t+URBr539u96QVOpmY= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770851999; c=relaxed/simple; bh=hukKGt0YveGF++HNVjF6iAoLFFRU3/X6fe1mdtnBAJk=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: Content-Type:MIME-Version; b=c0kPPIf4FKRAi7eY87QMRwgtMRVoKxmx1nkaSWEmjWjH085/KwrFMMqeth5V04DGJi/P12Oxix6wBJH7t965r6MGlBwzIgvGntNo3e1jITAtsJBo/uL3zJmpJk6nVDlFeW+iPzfdbHn6ectU2MxPnM5IiT4EizqRbawGixb0w7o= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=os.amperecomputing.com; spf=pass smtp.mailfrom=os.amperecomputing.com; dkim=fail (1024-bit key) header.d=os.amperecomputing.com header.i=@os.amperecomputing.com header.b=SzgEMEsY reason="signature verification failed"; arc=fail smtp.client-ip=52.101.85.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=os.amperecomputing.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=os.amperecomputing.com Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=os.amperecomputing.com header.i=@os.amperecomputing.com header.b="SzgEMEsY" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JNfyonwl/DDEd9gSDW2p0wrrpG7pHNywEWh92Dd5m6mCSjQLazSJWo8hlwX6OA0AHp4GrojT5twIX307wZgqHT0J60oOATPIJzDd1NEvlczsB9MOWwjY1O800ScMNP4qxiyd1xcz4UZLdrmRZ7C/9jJQmd0AvSU+B1VWJkPaBH7nZip5n7bqZU/9rhaW+KJOCxZzGhEYLPvIjgdTfIfivNbdFxJ9XAlTmRfe/K/Sge9VMrEimw4gU26ZKvJChlcXx+ZgSMmCkQ552NcOC3Ugo1ef/Mzo4kiCY+vCqcZDdDzujmh9cmIjpFHsQPzNFrPxsv2W0rPYoEhQLeKgUJ6c9Q== 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=Y2OLeJRu0Y1+xbRyCaBM1nGzFk9EOjEd1jYV1ZQAaas=; b=v/TGiWC0a+AURjqarNNqABFYYGhpPBNeatXgRCKcltzbGTg2l2xQP8khu8IBdCsUU03al6tuKOa9oDp+WGFQdNPUaFPlo4zv1Kx10e0Gb73Ags+qyJPRHErqlW6jPG2W/RsTUqHg6tthNXp88egznmcdu4SqU5vb9lIAF923HTHQCifiM9OxXwdaoZwPUN3Bw6tl7mz3ZLoraz09Sb9iMn+6DIlFw8UYGS2mQsXz37AzDE+bqHACq13wjrVa9kNn3u1G6xW/ULAO40/BJFhMPbOguTto1wPtetHsXlSYKyNivF8PgU4963SJHNGh6AJD+Cp5Wl+OEVVL7ppTp6dkyg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Y2OLeJRu0Y1+xbRyCaBM1nGzFk9EOjEd1jYV1ZQAaas=; b=SzgEMEsYQYa++MmKF8WVCaAWKkXy4MJ1z1Z+JWdStQEf6ZDuhV1Ogw6lkIV3WulNrPCkD21J+jEat6IPHJMwTxdEIFwxOQzD1ORyqwID8AOckY8rwuhxmS/iT0YDaXB2BKPYnMXFJUTlJuNIUAQIT3Lf6/N9iAZvh6JM49MPPWA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from DM2PR01MB9464.prod.exchangelabs.com (2603:10b6:8:2e4::17) by BN0PR01MB7166.prod.exchangelabs.com (2603:10b6:408:155::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9587.15; Wed, 11 Feb 2026 23:19:51 +0000 Received: from DM2PR01MB9464.prod.exchangelabs.com ([fe80::8b41:b64c:97d4:ed48]) by DM2PR01MB9464.prod.exchangelabs.com ([fe80::8b41:b64c:97d4:ed48%4]) with mapi id 15.20.9611.008; Wed, 11 Feb 2026 23:19:51 +0000 Date: Wed, 11 Feb 2026 15:19:47 -0800 (PST) From: Shubhang Kaushik To: Frederic Weisbecker , Adam Li cc: anna-maria@linutronix.de, tglx@linutronix.de, mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, vschneid@redhat.com, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, cl@linux.com, linux-kernel@vger.kernel.org, patches@amperecomputing.com, Christoph Lameter Subject: Re: [PATCH RESEND 1/2] tick/nohz: Fix wrong NOHZ idle CPU state In-Reply-To: Message-ID: References: <20250821042707.62993-1-adamli@os.amperecomputing.com> <20250821042707.62993-2-adamli@os.amperecomputing.com> Content-Type: multipart/mixed; boundary="1275739760-2137821480-1770851990=:237874" X-ClientProxiedBy: CYXP220CA0010.NAMP220.PROD.OUTLOOK.COM (2603:10b6:930:ee::13) To DM2PR01MB9464.prod.exchangelabs.com (2603:10b6:8:2e4::17) 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: DM2PR01MB9464:EE_|BN0PR01MB7166:EE_ X-MS-Office365-Filtering-Correlation-Id: 58c2952c-8830-42c3-7f07-08de69c40e40 X-MS-Exchange-AtpMessageProperties: SA X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016|7416014; X-Microsoft-Antispam-Message-Info: =?iso-8859-7?Q?VGJ7cX+s0ulfNebi56sB3Fahbx7WrU70f4UeXueVwFa01D2ANhu5TPjhHO?= =?iso-8859-7?Q?iqSd1I9zlnQOQu4azflvVJP4nz243kCo/IfRJfsOeMzaDnU3wiy61Cfblc?= =?iso-8859-7?Q?1LoeVnEtJq0md3IHJFqVvvXxxtSorEX0Jr5Uok48HYWySQUfSscA1O8ZBe?= =?iso-8859-7?Q?7oHjyUdurT8ifAcrY+O4m/2OJUE/cyXsqcFrhiofibl8JdWD8s1rhEtcuZ?= =?iso-8859-7?Q?9FcUuVqrrvjVstVGEAJLTPuj2gj/LpDNfDfLvggpcmhik0/Epo3uE9Rpg9?= =?iso-8859-7?Q?XfL0g6p/Rt4VFbTBWXQGf6P7Dah8Ab7I3MpMGWV5p+cQYXbTrIGoHkHSW3?= =?iso-8859-7?Q?dRjXsYps1GHHeRBWVKJbF25b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C?= =?iso-8859-7?Q?0g70PwS+LSOtFQ6ltc/gcNbIYBNzFB1qKY75H3VGdaMfuhxZi8mWMykFkB?= =?iso-8859-7?Q?ZfCEIzq/BftEHGhOR08n1Zm6oIzgPZd5H78jJWvsgKvDXfMTNxq1mIxgVm?= =?iso-8859-7?Q?2ODJr2Ljc4TOHi7Te0IRdoWmfcffRaU5w9Cz16r+A1LNhADpGPusowpprw?= =?iso-8859-7?Q?fE7OJV2Qcum5pW10mm64tkWqjdfHeg64RPImw6r38iSVyFytNK6YPbqQ3o?= =?iso-8859-7?Q?wnG8iD8stUAroN9iu/rMXWKox6Ko8i+Wmk/WFtXo+yPo3np27RTycrZO5s?= =?iso-8859-7?Q?SuE0sXJVhxpLekQVyMqoMOwPVpHJhjRckUqa6v9wFFNGN9oNACUJTDdvmx?= =?iso-8859-7?Q?D98m/RVWy7Zes=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM2PR01MB9464.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(366016)(7416014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-7?Q?136drRru1q1Iic1/zvi+pI54oQXKUu4DCC+V/PtiW78O2lUjhlObrIVKb4?= =?iso-8859-7?Q?18z1H+r2Bun3wUNN7xubka4o28rHgAio+8YivjqPBZHWsIrGQY65qUndcT?= =?iso-8859-7?Q?QszqgfvukZuZJD04bg/IWzvht88jfADSyLn08kCH5aNLdPxagggMd04GQQ?= =?iso-8859-7?Q?U9D4lfEpAYMc2dfyvxXxAVx/dXlQCA5dn1uo/5CC5wQj/jSqDg+LnyL7AP?= =?iso-8859-7?Q?HemDYuqE0aaECHP/PkL9WNEF6T3lZqoNdJopPyCDU6zbC2cwNbij5t4yt5?= =?iso-8859-7?Q?smGF18OoSdI01O0kyNXBE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859-7?Q?VvMn3o87rAo0o54dyjYBWMylDwwaapNbalSFROVWYZ4qLZ2HoW6LzjIyWI?= =?iso-8859-7?Q?EX8Hm/S51AUeMlC2SHnIkFxCkXUjvKc6/xaRMPLoJP59TS+8XxiY9ZYa22?= =?iso-8859-7?Q?SH3cNNkHI4Fz/ogt3kc09oHcbszoKCMHxPWsqhMm25r5CHpm856I+KLmUZ?= =?iso-8859-7?Q?BJLdevdUsjwbZSTvLv3hb9hnd5uZ1mFaqD7fo0bQrV1RUpcnTPIX5kaRco?= =?iso-8859-7?Q?t1lfJJroiE1gTehZCulSOGZ82HYxdk2Krm9s4INtrs5r6GYce+N0iCUqNR?= =?iso-8859-7?Q?/IZuYo7AD/7HyKWJye2iSIC35I6PIxLHvOeTWi/xJggJPVZtkrp7PzUsx+?= =?iso-8859-7?Q?pZKjQpdmJ061CnpdeVB/d12V55PBDBfEuag0NZuY0501JgF8SnbDKgZugz?= =?iso-8859-7?Q?n2juI2lqOBsrPfF1OuKA7empLhVRuac6lcwSZj9VgBdkGQQ4sTR95Wg/oG?= =?iso-8859-7?Q?DHFDAZM8IWRv3TFWQsvCYSp4Yc5qsxjWsJPHJCysbefPtGhoOKr883InAd?= =?iso-8859-7?Q?OyVg3X5oF2NBlCCJ4/0vBFzB+iavvGHpcyichPWE4Q3KZzDmhTatUlevQG?= =?iso-8859-7?Q?259lF4iihhpSW6EzpUCskgL+XPtNjn1CRdGMosJjiyiGJA3d8Rcc?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 58c2952c-8830-42c3-7f07-08de69c40e40 X-MS-Exchange-CrossTenant-AuthSource: DM2PR01MB9464.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2026 23:19:51.2660 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: tQ0C+Ywv4dVE9W/nyaCzZXi6VTpbs8VkDWWpEaiMQIJCRcdcQWK34L9mbmjKu2lWCE2kcB4eYVhLGU1jpdfUn+2vGPQRS4C9muWRVtZc+ZoxqfDlIxAlXth73MTfP2pW X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR01MB7166 --1275739760-2137821480-1770851990=:237874 Content-Type: text/plain; charset=ISO-8859-7; format=flowed Content-Transfer-Encoding: 8BIT Hi Frederic, On Thu, 4 Sep 2025, Frederic Weisbecker wrote: >> diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c >> index c527b421c865..b900a120ab54 100644 >> --- a/kernel/time/tick-sched.c >> +++ b/kernel/time/tick-sched.c >> @@ -1229,8 +1229,9 @@ void tick_nohz_idle_stop_tick(void) >> ts->idle_sleeps++; >> ts->idle_expires = expires; >> >> - if (!was_stopped && tick_sched_flag_test(ts, TS_FLAG_STOPPED)) { >> - ts->idle_jiffies = ts->last_jiffies; >> + if (tick_sched_flag_test(ts, TS_FLAG_STOPPED)) { >> + if (!was_stopped) >> + ts->idle_jiffies = ts->last_jiffies; >> nohz_balance_enter_idle(cpu); > > The current state is indeed broken and some people have already tried to fix it. > The thing is nohz_full don't want dynamic isolation because it is deemed to run a > single task. Therefore those tasks must be placed manually in order not to break > isolation guarantees by accident. > > In fact nohz_full doesn't make much sense without isolcpus (or isolated cpuset > v2 partitions) and I even intend to make nohz_full depend on domain isolation > in the long term. > > Thanks. Following up on the isolation concerns raised previously, I¢ve posted an updated patch [1] that provides a clearer justification and performance data from Ampere Altra. The core issue identified is that on high core count systems, nohz_full CPUs often become stranded idle because they are missing from nohz.idle_cpus_mask. While I understand the intent for manual isolation, our testing shows that this current behavior leads to significant under utilization. - LLM Workloads: ~14% throughput improvement in llama-batched-bench. - Scheduler Jitter: ~26% improvement in hackbench multi-process tests. The patch decouples the tick-stop accounting (which should only happen once) from the balancer registration. Because nohz_balance_enter_idle() is idempotent, an idle CPU would be visible to the balancer without breaking the isolation of other cores that are actually running tasks. If a CPU has entered do_idle(), it is no longer running an isolated workload. It is invisible to the balancer at that point leading to performance regression rather than an isolation guarantee. You can find the updated patch and full performance breakdown here: [1] https://lkml.org/lkml/2026/2/3/2119 Regards, Shubhang Kaushik > >> } >> } else { >> -- >> 2.34.1 >> > > -- > Frederic Weisbecker > SUSE Labs > --1275739760-2137821480-1770851990=:237874--