From nobody Fri Oct 3 15:35:58 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0C482322DB9; Fri, 29 Aug 2025 15:48:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756482520; cv=none; b=epq7a1pP5l+cxOhwKS0Ru5/gDXBJJCOBWItxuHbc5wh9Y1QkJybN8nrXvZvrNp2Oy6sEAnACPnR/os6BuFVnjkiM9u0COzAb/uUK7z8XtqyE2/P8LSxxUUd17Ccik6r8P97jqB3iivzUgMVFGocmOu0WrDCWmOZqOIe3QaXRM9E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756482520; c=relaxed/simple; bh=78cfTk//lEQ7a6zMtD55eixVrCWYYR/yhAFKP0zepco=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ODOZChezX8BKOwiOwnXiZWMxZYqcKvsRUMdqQXoOnHjdXuwWuA5DILhnAln8NAT0x0jZDrwwZdpwDbKrwAEdCeMSYo97RdOZ4cGXFJA4GhIyro/FX/1WE6t+eFlFeboILE50VZ1haUTLbTYyQHCgJM9OBd9wXeQNqyp3jeIpbWo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rQtAqNGN; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rQtAqNGN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EEA25C4CEF6; Fri, 29 Aug 2025 15:48:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1756482519; bh=78cfTk//lEQ7a6zMtD55eixVrCWYYR/yhAFKP0zepco=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rQtAqNGNqOxuGB4np2oOSlxOm6TShBeQ8RMxJ5ignz+97LVJp3l+gLQ5y/f1lGABl 7wSsgru6emmQ3FxUQRIvLP1Jn90aIL8d/U3od5zuuvc+H1neeqNp/kob/lwCKgaGuk ZsR0vU7UgdQxILNcigf61ln/eXaZnUO18HFoVIampFSaYSQH9JJqOutRO3Pc6H0E9a hsf7bouSN2BBnqj5Qe5xem6aTvQOlSFrgOJWmVIFmEpul2BB041qUpjm+iMkulhsms pxr8JawDYtMwk8q8Zm8y9YRJhYy3JCO/ShLTerLV0eKZYEzAvlJrclPuMqFFnzkMSE d3PYwgx10s5/g== From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Johannes Weiner , Marco Crivellari , Michal Hocko , Michal Koutny , Peter Zijlstra , Tejun Heo , Thomas Gleixner , Vlastimil Babka , Waiman Long , cgroups@vger.kernel.org Subject: [PATCH 07/33] cpuset: Convert boot_hk_cpus to use HK_TYPE_DOMAIN_BOOT Date: Fri, 29 Aug 2025 17:47:48 +0200 Message-ID: <20250829154814.47015-8-frederic@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250829154814.47015-1-frederic@kernel.org> References: <20250829154814.47015-1-frederic@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" boot_hk_cpus is an ad-hoc copy of HK_TYPE_DOMAIN_BOOT. Remove it and use the official version. Signed-off-by: Frederic Weisbecker Reviewed-by: Phil Auld --- kernel/cgroup/cpuset.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index 27adb04df675..b00d8e3c30ba 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -80,12 +80,6 @@ static cpumask_var_t subpartitions_cpus; */ static cpumask_var_t isolated_cpus; =20 -/* - * Housekeeping (HK_TYPE_DOMAIN) CPUs at boot - */ -static cpumask_var_t boot_hk_cpus; -static bool have_boot_isolcpus; - /* List of remote partition root children */ static struct list_head remote_children; =20 @@ -1601,15 +1595,16 @@ static void remote_cpus_update(struct cpuset *cs, s= truct cpumask *xcpus, * @new_cpus: cpu mask * Return: true if there is conflict, false otherwise * - * CPUs outside of boot_hk_cpus, if defined, can only be used in an + * CPUs outside of HK_TYPE_DOMAIN_BOOT, if defined, can only be used in an * isolated partition. */ static bool prstate_housekeeping_conflict(int prstate, struct cpumask *new= _cpus) { - if (!have_boot_isolcpus) + if (!housekeeping_enabled(HK_TYPE_DOMAIN_BOOT)) return false; =20 - if ((prstate !=3D PRS_ISOLATED) && !cpumask_subset(new_cpus, boot_hk_cpus= )) + if ((prstate !=3D PRS_ISOLATED) && + !cpumask_subset(new_cpus, housekeeping_cpumask(HK_TYPE_DOMAIN_BOOT))) return true; =20 return false; @@ -3764,12 +3759,9 @@ int __init cpuset_init(void) =20 BUG_ON(!alloc_cpumask_var(&cpus_attach, GFP_KERNEL)); =20 - have_boot_isolcpus =3D housekeeping_enabled(HK_TYPE_DOMAIN); - if (have_boot_isolcpus) { - BUG_ON(!alloc_cpumask_var(&boot_hk_cpus, GFP_KERNEL)); - cpumask_copy(boot_hk_cpus, housekeeping_cpumask(HK_TYPE_DOMAIN)); - cpumask_andnot(isolated_cpus, cpu_possible_mask, boot_hk_cpus); - } + if (housekeeping_enabled(HK_TYPE_DOMAIN_BOOT)) + cpumask_andnot(isolated_cpus, cpu_possible_mask, + housekeeping_cpumask(HK_TYPE_DOMAIN_BOOT)); =20 return 0; } --=20 2.51.0