mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chen Ridong <chenridong@huaweicloud.com>
To: "Waiman Long" <longman@redhat.com>, "Tejun Heo" <tj@kernel.org>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Michal Koutný" <mkoutny@suse.com>
Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
	Chen Ridong <chenridong@huawei.com>,
	Gabriele Monaco <gmonaco@redhat.com>,
	Frederic Weisbecker <frederic@kernel.org>
Subject: Re: [cgroup/for-6.19 PATCH v3 3/5] cgroup/cpuset: Move up prstate_housekeeping_conflict() helper
Date: Wed, 5 Nov 2025 14:18:18 +0800	[thread overview]
Message-ID: <165437cc-d104-4b10-8efb-3da87ed5aa51@huaweicloud.com> (raw)
In-Reply-To: <20251105043848.382703-4-longman@redhat.com>



On 2025/11/5 12:38, Waiman Long wrote:
> Move up the prstate_housekeeping_conflict() helper so that it can be
> used in remote partition code.
> 
> Signed-off-by: Waiman Long <longman@redhat.com>
> ---
>  kernel/cgroup/cpuset.c | 40 ++++++++++++++++++++--------------------
>  1 file changed, 20 insertions(+), 20 deletions(-)
> 
> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
> index 99622e90991a..cc9c3402f16b 100644
> --- a/kernel/cgroup/cpuset.c
> +++ b/kernel/cgroup/cpuset.c
> @@ -1432,6 +1432,26 @@ static bool isolated_cpus_can_update(struct cpumask *add_cpus,
>  	return res;
>  }
>  
> +/*
> + * prstate_housekeeping_conflict - check for partition & housekeeping conflicts
> + * @prstate: partition root state to be checked
> + * @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
> + * isolated partition.
> + */
> +static bool prstate_housekeeping_conflict(int prstate, struct cpumask *new_cpus)
> +{
> +	if (!have_boot_isolcpus)
> +		return false;
> +
> +	if ((prstate != PRS_ISOLATED) && !cpumask_subset(new_cpus, boot_hk_cpus))
> +		return true;
> +
> +	return false;
> +}
> +
>  static void update_isolation_cpumasks(bool isolcpus_updated)
>  {
>  	int ret;
> @@ -1727,26 +1747,6 @@ static void remote_cpus_update(struct cpuset *cs, struct cpumask *xcpus,
>  	remote_partition_disable(cs, tmp);
>  }
>  
> -/*
> - * prstate_housekeeping_conflict - check for partition & housekeeping conflicts
> - * @prstate: partition root state to be checked
> - * @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
> - * isolated partition.
> - */
> -static bool prstate_housekeeping_conflict(int prstate, struct cpumask *new_cpus)
> -{
> -	if (!have_boot_isolcpus)
> -		return false;
> -
> -	if ((prstate != PRS_ISOLATED) && !cpumask_subset(new_cpus, boot_hk_cpus))
> -		return true;
> -
> -	return false;
> -}
> -
>  /**
>   * update_parent_effective_cpumask - update effective_cpus mask of parent cpuset
>   * @cs:      The cpuset that requests change in partition root state

Reviewed-by: Chen Ridong <chenridong@huawei.com>

-- 
Best regards,
Ridong


  reply	other threads:[~2025-11-05  6:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-05  4:38 [cgroup/for-6.19 PATCH v3 0/5] cgroup/cpuset: Additional housekeeping check & cleanup Waiman Long
2025-11-05  4:38 ` [cgroup/for-6.19 PATCH v3 1/5] cgroup/cpuset: Rename update_unbound_workqueue_cpumask() to update_isolation_cpumasks() Waiman Long
2025-11-05  4:38 ` [cgroup/for-6.19 PATCH v3 2/5] cgroup/cpuset: Fail if isolated and nohz_full don't leave any housekeeping Waiman Long
2025-11-05  7:06   ` Chen Ridong
2025-11-05  4:38 ` [cgroup/for-6.19 PATCH v3 3/5] cgroup/cpuset: Move up prstate_housekeeping_conflict() helper Waiman Long
2025-11-05  6:18   ` Chen Ridong [this message]
2025-11-05  4:38 ` [cgroup/for-6.19 PATCH v3 4/5] cgroup/cpuset: Ensure domain isolated CPUs stay in root or isolated partition Waiman Long
2025-11-05  6:29   ` Chen Ridong
2025-11-05  4:38 ` [cgroup/for-6.19 PATCH v3 5/5] cgroup/cpuset: Globally track isolated_cpus update Waiman Long
2025-11-05 17:07 ` [PATCH v3 0/5] cgroup/cpuset: Additional housekeeping check & cleanup Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=165437cc-d104-4b10-8efb-3da87ed5aa51@huaweicloud.com \
    --to=chenridong@huaweicloud.com \
    --cc=cgroups@vger.kernel.org \
    --cc=chenridong@huawei.com \
    --cc=frederic@kernel.org \
    --cc=gmonaco@redhat.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mkoutny@suse.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®