[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7742487a-81e0-430f-8c4d-f1a761c2af98@huaweicloud.com>
Date: Thu, 6 Nov 2025 09:20:26 +0800
From: Chen Ridong <chenridong@...weicloud.com>
To: Frederic Weisbecker <frederic@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Cc: Michal Koutný <mkoutny@...e.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Catalin Marinas <catalin.marinas@....com>, Danilo Krummrich
<dakr@...nel.org>, "David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Gabriele Monaco <gmonaco@...hat.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Ingo Molnar <mingo@...hat.com>, Jakub Kicinski <kuba@...nel.org>,
Jens Axboe <axboe@...nel.dk>, Johannes Weiner <hannes@...xchg.org>,
Lai Jiangshan <jiangshanlai@...il.com>,
Marco Crivellari <marco.crivellari@...e.com>, Michal Hocko
<mhocko@...e.com>, Muchun Song <muchun.song@...ux.dev>,
Paolo Abeni <pabeni@...hat.com>, Peter Zijlstra <peterz@...radead.org>,
Phil Auld <pauld@...hat.com>, "Rafael J . Wysocki" <rafael@...nel.org>,
Roman Gushchin <roman.gushchin@...ux.dev>,
Shakeel Butt <shakeel.butt@...ux.dev>, Simon Horman <horms@...nel.org>,
Tejun Heo <tj@...nel.org>, Thomas Gleixner <tglx@...utronix.de>,
Vlastimil Babka <vbabka@...e.cz>, Waiman Long <longman@...hat.com>,
Will Deacon <will@...nel.org>, cgroups@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-block@...r.kernel.org,
linux-mm@...ck.org, linux-pci@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH 06/31] cpuset: Convert boot_hk_cpus to use
HK_TYPE_DOMAIN_BOOT
On 2025/11/6 5:03, Frederic Weisbecker wrote:
> 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 <frederic@...nel.org>
> Reviewed-by: Phil Auld <pauld@...hat.com>
> ---
> 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 52468d2c178a..8595f1eadf23 100644
> --- a/kernel/cgroup/cpuset.c
> +++ b/kernel/cgroup/cpuset.c
> @@ -81,12 +81,6 @@ static cpumask_var_t subpartitions_cpus;
> */
> static cpumask_var_t isolated_cpus;
>
> -/*
> - * 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;
>
> @@ -1686,15 +1680,16 @@ static void remote_cpus_update(struct cpuset *cs, struct 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;
>
> - if ((prstate != PRS_ISOLATED) && !cpumask_subset(new_cpus, boot_hk_cpus))
> + if ((prstate != PRS_ISOLATED) &&
> + !cpumask_subset(new_cpus, housekeeping_cpumask(HK_TYPE_DOMAIN_BOOT)))
> return true;
>
> return false;
> @@ -3824,12 +3819,9 @@ int __init cpuset_init(void)
>
> BUG_ON(!alloc_cpumask_var(&cpus_attach, GFP_KERNEL));
>
> - have_boot_isolcpus = 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));
>
> return 0;
> }
Reviewed-by: Chen Ridong <chenridong@...wei.com>
--
Best regards,
Ridong
Powered by blists - more mailing lists