From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1132F34104B for ; Thu, 9 Jul 2026 02:32:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783564350; cv=none; b=ccnqNmlcvt+opV7qRqXHB/Cad3AdSbtn1NF7d1vJe9L93u+jrPoixaM6QnRPH4lq9MLUmAPdOBOvTc20ucRTIqgM5mhrf+Y0cMeDy9etK1rjKIDosWA7RZO83JQfyTrjo7lzJ3Chl1A0jJFcbnV06dIJWjhdTBp1jX65r46KcZs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783564350; c=relaxed/simple; bh=lkIEGCAQB9zasZeDMyaogtJAsY/y74T/tGmONLBNQ14=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dkYXREFfv/bMOap7U7YBlwe9m0kmdrub4ocPJuCrQ4ZRszfER8rpydy6hrpruAAD5NY6a5WkdTJ1Sg0EftCCn7upOR0u4/CyPfviGwwxkXnzVOfm71C2Z00YjywwLjm9MsSdiaim5KDI+p7iM0hYzNKBQCdw4VBwj3HxoSLJIJE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gKqSMIYA; arc=none smtp.client-ip=209.85.214.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gKqSMIYA" Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-2ccf2360620so10668025ad.3 for ; Wed, 08 Jul 2026 19:32:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783564348; x=1784169148; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Q+15WoPo9JZ7YZJgmoBicVekPX6+Bo4zcfrfvSoymnE=; b=gKqSMIYAP5yxJmdOdbX1yuJ/esOPdQaIyPO0GgiCbfxFp6pFAwo8em7XViI2UNrBr+ 3N5Cnw0XS2qyX6ie9EEcb1vbf2Kw4cU/5CFA9151mrw6AwZ9gn67nBEUyeVOjaBqhj8u 9WSQoDW4/REadcOP3OGYyH9eThTb4AxGtmZ5QF4gw16pxVUZlD6jiPg93ZYQ9R8ZTsga kGaNXKCdVpzGWywzR/wgGmLFo1TasyslIgyt9puSzfs1IZlXECuMHp2ZDenr0XVtVtIh SAEKsIc9W/TQexG3dp5GfExtzwVvvSf4ocJPWxr2qhnlCO/3TE8bNQXRR+ICYlkSI+Lc fang== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783564348; x=1784169148; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=Q+15WoPo9JZ7YZJgmoBicVekPX6+Bo4zcfrfvSoymnE=; b=YLo3va+pDAsyntDV0q4DCScKY9fOE1+JXyUP/j6otH23Kkb/vxiI/zLx8A49i1Rjdt 6UNjrctXGfSZL16lhY1+NRzGvbdZm7fAwJ10oP3T8iy+Zux4/5NTKANzUI57n2E5XKMf /XDCU4kwGSbvNNNEGojkWzLpsy1CtgLFSdWob/EaDV2wKBo7/aHhoUgRlvwRsBtxe3V0 e4jr/uVANtQ5kWZXJEntOgP7nKNgK6QPUI3MiiXVL2WNgt9AQhgoCMF7nMKo/FjBKjCl HPM1e7pBdIbTkTn4mq1ihAfOHr9PdAiA9HEVBbdifpCvPIb3QdI/5x3BthemvpF/okIb 7TUg== X-Forwarded-Encrypted: i=1; AHgh+RpF1PEc3sBUBrOWp1sa2eGRyqZ5WhmzBQxKGRG8HXDNG+BXE4aMYWVy18z8G2v2VQE7FJyO7zmvYCzQMas=@vger.kernel.org X-Gm-Message-State: AOJu0YwyYwblM2Tjlm92PC9CGHogRW7KeO8RxK52dDNakSUJAf3kYP7t MybLPCjrhcQb7ewNgtAe8KrnQn0KbTa4zJm3s+5P6zRZCI3BGoFdcuJ3 X-Gm-Gg: AfdE7ckvKFDpk2YZxdvOpjUB2/RYqBfpcCXR0nfUlNrE/GWxWDFnZyIQI7DhGpFIaMB 5SeoyXmgrfxaySHkKdRgXe1e8H8O/xCLJs4JuayuT2LlGHn9RAYrEqOBOU66u1jxLM+pEcwQoaT bLjA337H1OI9TeeT8dP8yirr0wrZB8Mcf/8adM1S7D3PLmWqe7qqk/NYGUKG9VDwueI03FnuD9l nfzmEHy/X/AVjA6NGc6UFk8/9ay72wLt9GFufp3fhLA3SXw4fxkT+3ceCm4AfgXivSLPpd/kkJ2 K0MeDj5ri3C6VER4QvzQolhy/6oqbxwHD8s4dKQzcRLMRaFQ8TDOPCMcGEI/wHlYtN45T/Wgzwu G5DAkFRem8j+9eUzRyRw5YOPgUl/fl8NW/4QM0q5FDgF+dmxce6wyRcbgxUEVwSlN4lTwfLHRtE Snq8flync= X-Received: by 2002:a17:903:298f:b0:2c0:b6c7:227e with SMTP id d9443c01a7336-2ccea3485b7mr64177845ad.5.1783564348234; Wed, 08 Jul 2026 19:32:28 -0700 (PDT) Received: from ubuntu.. ([138.199.21.246]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2ccc9d5bde9sm35795005ad.79.2026.07.08.19.32.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2026 19:32:27 -0700 (PDT) From: Jing Wu To: Frederic Weisbecker , Waiman Long Cc: Jing Wu , Thomas Gleixner , linux-kernel@vger.kernel.org, rcu@vger.kernel.org, cgroups@vger.kernel.org, Qiliang Yuan Subject: Re: [PATCH-next 00/23] cgroup/cpuset: Enable runtime update of nohz_full and managed_irq CPUs Date: Thu, 9 Jul 2026 10:32:20 +0800 Message-ID: <20260709023221.634684-1-realwujing@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260702033934.984512-1-realwujing@gmail.com> References: <20260421030351.281436-1-longman@redhat.com> <20260702033934.984512-1-realwujing@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Since we offered to take the RCU/nocb piece, here is a concrete shape to shoot at. Constraint recap (kernel/rcu/tree_nocb.h): rcu_nocb_cpu_{offload,deoffload}() require the CPU offline (they reject when cpu_online()) under cpus_read_lock + nocb_mutex, and per Frederic the toggle really needs CPUHP_AP_IDLE_DEAD because callbacks can still be enqueued before that. Reaching IDLE_DEAD pays the stop_machine cost that disturbs other isolated partitions. Observation: among the kernel-noise types, only RCU needs that deep offline; tick, managed_irq and the watchdog reconfigure through the existing online-side callbacks. So bundling RCU under HK_TYPE_KERNEL_NOISE makes every isolation change pay the RCU cost. Proposal: 1. Split HK_TYPE_RCU out of HK_TYPE_KERNEL_NOISE into its own runtime-mutable type, plus an immutable HK_TYPE_RCU_BOOT snapshot. HK_TYPE_KERNEL_NOISE keeps tick/timer/misc/wq. 2. Gate nocb changes behind an explicit, per-partition cpuset opt-in. Default off: partition changes never touch rcu_nocb_mask, so no spike is inflicted on other partitions. On: the isolated CPUs join/leave the nocb set, paying the offline cost once at setup/teardown. This is Waiman's admin-choice knob. 3. Do the toggle inside the serialized hotplug transition at CPUHP_AP_IDLE_DEAD, rather than the remove_cpu() -> toggle -> add_cpu() dance our v3 prototype used, which raced with concurrent hotplug. Open questions: - Frederic: is CPUHP_AP_IDLE_DEAD the right hook, and is a new cpuhp callback there acceptable versus the current post-offline API? - admin pre-offlines the target CPUs (your earlier suggestion) versus the cpuset code cycling them via Thomas's per-CPU down/up primitive? - does the "only RCU needs the deep offline" assumption hold for tick, managed_irq and the watchdog? If this shape sounds acceptable we will build it on top of your CPU down/up primitives. Thanks, Jing Wu Qiliang Yuan