From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from CH5PR02CU005.outbound.protection.outlook.com (mail-northcentralusazon11012016.outbound.protection.outlook.com [40.107.200.16]) (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 4BC6C42E007 for ; Fri, 27 Feb 2026 17:33:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.200.16 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772213598; cv=fail; b=mfjoKQN9uLdnbaoFIh5SnISFdWrzxxslu53uZTADYTo81yl9riFgBdZY0QgiPGodOxLaiXvpie2bpswBDFK/xwfRDqyTNR2uVaJ7vw935UOMF07OkSTRIG3UGkciwxjZdmzGFwGUg1pNLpwXZOfcrvV+zTNaSDHYghN12XJttEU= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772213598; c=relaxed/simple; bh=5pNJnkTOYQwMQF0stq8OVkfNCE3M+biMXSzeXQynhOI=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=boSPM9ckeWUu6LYFGhbkBkra8PEvIFiFRp35oRtXvRw50tOSO0eZK5nFNGjEdp/8Be6XZSJ88NPfr98GFsbU47qIoMXw4w12I01I0ZXMTEx99mY2zC40YNQOgfWcV+VQn7jgGcjHQSa7/DSboAyNIpSkW9DbDao3deAzaO7cAIc= 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=zFZ+k84P; arc=fail smtp.client-ip=40.107.200.16 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="zFZ+k84P" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BuS8+y7ob1nqGUpfCtA1x4ETUeKUjzS82ej++h2HEoQPDnnpLgWRt1/kTfwpDtFNEJcoMU3Xfw7QQp6DlWX5SrAXN9Y4812fQSuRvUshsgXHtR9fglLhTKC+v9uo0tPQrLcTUPTVSANlg44myuTMXhVGQYzEhru92RC4KBd2t/7leMtuVHYZpCRh7gvdvz2NrGlnICIoWFcnji2C2mhCnqYhcHgQY644tLKSzpQi7RrHxO3rLYUu7wegh7bJyAoPlAr9+OqFtKZyh4liSu+w8ZH3dxSYA+7ewNupaEfRFryyaPCmPblGIenlNsUXI3hN5ic+lxF6FyYCUS5iauFTyw== 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=7uxFKit7Fw9kK0iMYgJx2Ul7W7bGzKHKJDtbGWjF2NQ=; b=K4aQ953X/bzPk8AM+WITtiDs6JqO+Bq4eGUBFsLRxa2TYPqNV+qUWH40//0A1Cd3FHaBE8ROrkYKjWKhaWeL9zptsFwUFrW7wng/KzVCKE4IVUqbB1mj3hgbu1W8S0h152Y8M6aIlH49k59vxrDPs3e7OkWvu0y9WAMuAaZGnFm/xvYZ6errInJypmzVtbFGn255JJnwwwqY0iWMQn6eKcb+X7vjSce9QYMEsOWlGMDRDSMBRIeMUM4FF0qeCZxKYgk7yGC/aaZCu/GGnFUE0KhTbf2aE7RHwIJJnud3VBIH0Fu6MaGV8rVIeJ39l+r+GiFQ/CEp3tg7Kuz3bxBkHQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=linaro.org 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=7uxFKit7Fw9kK0iMYgJx2Ul7W7bGzKHKJDtbGWjF2NQ=; b=zFZ+k84Plmt1/3niGMjmA5h49oziqbELtyV0SqLPHgsq6DQZqG2DDwcAjZMEJxPgXGSSzLSEBmr3wqAvUh0oE63qf5OSI2dFKM1+EQZi5C8dfN6AD/k4BAbcYEHW0sjAt/LQwgvzjSL2cNwlOCwTHr4idIT+rlCnY2QiOK7Ws8s= Received: from BN0PR04CA0185.namprd04.prod.outlook.com (2603:10b6:408:e9::10) by PH7PR12MB9104.namprd12.prod.outlook.com (2603:10b6:510:2f3::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9654.15; Fri, 27 Feb 2026 17:33:08 +0000 Received: from BN1PEPF0000468B.namprd05.prod.outlook.com (2603:10b6:408:e9:cafe::9c) by BN0PR04CA0185.outlook.office365.com (2603:10b6:408:e9::10) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9632.26 via Frontend Transport; Fri, 27 Feb 2026 17:32:55 +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=satlexmb08.amd.com; pr=C Received: from satlexmb08.amd.com (165.204.84.17) by BN1PEPF0000468B.mail.protection.outlook.com (10.167.243.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9654.16 via Frontend Transport; Fri, 27 Feb 2026 17:33:02 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.2562.17; Fri, 27 Feb 2026 11:33:01 -0600 Received: from satlexmb07.amd.com (10.181.42.216) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 27 Feb 2026 11:33:01 -0600 Received: from [172.31.184.125] (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server id 15.2.2562.17 via Frontend Transport; Fri, 27 Feb 2026 11:32:58 -0600 Message-ID: <47e242af-3797-4952-95a8-2c58fc65177d@amd.com> Date: Fri, 27 Feb 2026 23:02:57 +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] sched/fair: Remove sd->nohz_idle To: Vincent Guittot , , , , , , , , , References: <20260227164726.1330712-1-vincent.guittot@linaro.org> Content-Language: en-US From: K Prateek Nayak In-Reply-To: <20260227164726.1330712-1-vincent.guittot@linaro.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Received-SPF: None (SATLEXMB03.amd.com: kprateek.nayak@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF0000468B:EE_|PH7PR12MB9104:EE_ X-MS-Office365-Filtering-Correlation-Id: 6512e12d-ce7d-4440-fb94-08de76264257 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|1800799024|82310400026|7416014|376014|921020; X-Microsoft-Antispam-Message-Info: TQiu6i03dPK9/fkfs1Gj48ggAA86lAIh9KgIY9/vcKQPYDIHXV6crFj+nqiOnd9tuWczcG8euFXjaUbQfOb3YUqI98aQmMl4CWVRp0JF/MJg32n1cjYQ12S5QIGnrCz5nw/waDRjyWBs1TekjqBe+6ITXnJz2tPlEfjPdM7ddhSf4H/lMRdsBdiingVhShp9RBxjI2OTgyF5iRTWTJazEekA2DXKisVjQ2Gk7z8wxLncObJtCLyS7hnSP7WAaVYavMrurGlpQQ+XaDpAhzc+5zeZCjcPRJklgL24rsgtbCRwBIMYzmrcJRnmnqaDP3wbY68NKL9FxdtJoMc6wyNw4ya5djfdUhf7B49dJWj18lRFrrhDCpCsrTEgStJ/GtsBRk10iXr8GEwj48tybQwM/7R83Me1KxSFZ4JKzu0HpRJzogGBnxR4yRs8SshZl4aZj/Lf/RetxrkjYR37APNqthGaSUSfN+ikH1hazxPRrcQNOJTvjhWeIPwDBPmgwN/ybv0dS/HOJR3NAEu1ZOzuv2jQ/iz+o3Esm3fUTB6UnYB+CIWnMrQ/Wbl+XufZo+D+0/yfS0f76raYIZnaQjrXaxN3n4pNW8nOFdDPbWl20X6qg9o+m8pNisD5s2neDounPuOwOwKPUBSbdMDKedr6nc5sVw7Zz0Z2CJNZetfNM9lMoMFqmfyUBdK1jf9T2Kg1ztrij5h0gwJQ0zVK7N4rWnEdTj45D30uSDswSVW/mJnY6CL9UXfw7ITnWMMKyE0aIuk/gnYr7v4o28W2my9l49Hm8SeWi0yyogmNaP7Ut9SKHOvESfc4IakFNVnMmXLVK7vOaqU3ODEfzEKPqL2toQ8ALkNKQfaupzFjC1kyb3Q= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb08.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700013)(1800799024)(82310400026)(7416014)(376014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dQcqIDxk2gToyfObV0kyefZ4AW1yi2AG0zctwQblV5BH/vXfq/7l5/WVyezp9f44dWlYbGt9lydAyM0AI5/JLwVSFVEnFHrBvASqgU+7zK+Cl5HPa39YbotqYvEbRjkwppyGW/hmiC4u0T/VwyhIdNOfjgfWR/ErSi/8xpICjJHvlp7VNMx7lN7Yur5V/dUZLZA9YWGFSYIYFh/8LK4NMqfdcmLwNpxWcB1opaigE5mTkD3GMVMP3qNbJEjRjW2PveQzEKRFi9tO83Du1gV5CNwspZ03vWEq4nCfmMkaJ5rNn9FutZWF4nPjdWf6cGPtuIw6+ovD7eb2I8B892tvnpepBH9H0HwEWd1xOL6NU9xKdaqkgEh2Pc8Yv0UUy7PwNBE9cCUBvcoaqZFPdBXIdkAdebc+jpqLclJXsO1a2IKO9iUddlAEscOLQP+UggxP X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2026 17:33:02.6648 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6512e12d-ce7d-4440-fb94-08de76264257 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=[satlexmb08.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN1PEPF0000468B.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB9104 Hello Vincent, On 2/27/2026 10:17 PM, Vincent Guittot wrote: > sd->nohz_idle is used to call once inc|dec of &sd->shared->nr_busy_cpus > when entering or leaving idle state but the call to > set_cpu_sd_state_idle|busy is already protected by rq->nohz_tick_stopped > being already set or clear. > > Remove the useless sd->nohz_idle field which equals !rq->nohz_tick_stopped. I had looked at this recently and I believe the following is possible with hotplug/cpuset: CPU0 CPU1 ==== ==== nohz_balance_enter_idle() atomic_dec(&sd->shared->nr_busy_cpus); ... /* Idle */ /* Sched domains are rebuilt */ atomic_set(&sd->shared->nr_busy_cpus, sd_weight); update_top_cache_domain(0 /* CPU0 */) sd = highest_flag_domain(cpu, SD_SHARE_LLC); rcu_assign_pointer(per_cpu(sd_llc, cpu), sd); /* For CPU0 */ ... /* Exits idle */ ... ... /* First tick hits */ /* Exits idle; First tick hits */ if (rq->nohz_tick_stopped) /* True */ nohz_balance_exit_idle() set_cpu_sd_state_busy() atomic_inc(&sd->shared->nr_busy_cpus) /* !!! Crosses sd_weight !!! */ I feel this per-SD indicator is necessary to avoid this scenario. Is it fixed in some other way that I haven't realised yet? -- Thanks and Regards, Prateek