cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chen Ridong <chenridong@huaweicloud.com>
To: Waiman Long <llong@redhat.com>,
	tj@kernel.org, hannes@cmpxchg.org, mkoutny@suse.com
Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
	lujialin4@huawei.com, chenridong@huawei.com
Subject: Re: [PATCH -next RFC 07/11] cpuset: refactor out invalidate_cs_partition
Date: Sat, 30 Aug 2025 09:33:09 +0800	[thread overview]
Message-ID: <5d0f67d9-07fc-4e09-903a-dfc26c9f4a87@huaweicloud.com> (raw)
In-Reply-To: <98eb72df-2897-413e-8c01-7d688ad58810@redhat.com>



On 2025/8/30 3:56, Waiman Long wrote:
> 
> On 8/28/25 8:56 AM, Chen Ridong wrote:
>> From: Chen Ridong <chenridong@huawei.com>
>>
>> Refactor the invalidate_cs_partition function to handle cpuset partition
>> invalidation when modifying cpuset.cpus. This refactoring also makes the
>> function reusable for handling cpuset.cpus.exclusive updates in subsequent
>> patches.
>>
>> Signed-off-by: Chen Ridong <chenridong@huawei.com>
>> ---
>>   kernel/cgroup/cpuset.c | 49 +++++++++++++++++++++++++++++++-----------
>>   1 file changed, 36 insertions(+), 13 deletions(-)
>>
>> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
>> index 5cfc53fe717c..71190f142700 100644
>> --- a/kernel/cgroup/cpuset.c
>> +++ b/kernel/cgroup/cpuset.c
>> @@ -2376,6 +2376,40 @@ static int parse_cpulist(const char *buf, struct cpumask *out_mask)
>>       return 0;
>>   }
>>   +/**
>> + * invalidate_cs_partition - Validate and mark the validity of a cpuset partition configuration
> 
> The function name has "invalidate", but the description uses validate. It is confusing.
> 
> My suggestion
> 
>   validate_partition - Check the validity of a cpuset partition configuration
> 
>   Return 0 if valid, a non-zero prs_errcode otherwise
> 
> Cheers,
> Longman

Thank you Longman,

I originally used that name for a local value 'invalidated' within update_cpumask. However, since
subsequent patches have removed the invalidated, validate_partition would be a much more appropriate
name. I will update it accordingly.

-- 
Best regards,
Ridong


  reply	other threads:[~2025-08-30  1:33 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-28 12:56 [PATCH -next RFC 00/11] Refactor cpus mask setting Chen Ridong
2025-08-28 12:56 ` [PATCH -next RFC 01/11] cpuset: move the root cpuset write check earlier Chen Ridong
2025-08-29 19:21   ` Waiman Long
2025-08-30  1:11     ` Chen Ridong
2025-08-28 12:56 ` [PATCH -next RFC 02/11] cpuset: remove unused assignment to trialcs->partition_root_state Chen Ridong
2025-08-28 12:56 ` [PATCH -next RFC 03/11] cpuset: change return type of is_partition_[in]valid to bool Chen Ridong
2025-08-28 12:56 ` [PATCH -next RFC 04/11] cpuset: Refactor exclusive CPU mask computation logic Chen Ridong
2025-08-28 12:56 ` [PATCH -next RFC 05/11] cpuset: refactor CPU mask buffer parsing logic Chen Ridong
2025-08-28 12:56 ` [PATCH -next RFC 06/11] cpuset: introduce cpus_excl_conflict and mems_excl_conflict helpers Chen Ridong
2025-08-29 19:29   ` Waiman Long
2025-08-30  1:27     ` Chen Ridong
2025-08-28 12:56 ` [PATCH -next RFC 07/11] cpuset: refactor out invalidate_cs_partition Chen Ridong
2025-08-29 19:56   ` Waiman Long
2025-08-30  1:33     ` Chen Ridong [this message]
2025-08-28 12:56 ` [PATCH -next RFC 08/11] cpuset: refactor acpus_validate_change Chen Ridong
2025-08-29 20:12   ` Waiman Long
2025-08-30  1:42     ` Chen Ridong
2025-08-28 12:56 ` [PATCH -next RFC 09/11] cpuset: refactor partition_cpus_change Chen Ridong
2025-08-29 20:32   ` Waiman Long
2025-08-30  2:01     ` Chen Ridong
2025-09-02 13:30       ` Waiman Long
2025-09-03  0:51         ` Chen Ridong
2025-08-28 12:56 ` [PATCH -next RFC 10/11] cpuset: use parse_cpulist for setting cpus.exclusive Chen Ridong
2025-08-28 12:56 ` [PATCH -next RFC 11/11] cpuset: use partition_cpus_change for setting exclusive cpus Chen Ridong

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=5d0f67d9-07fc-4e09-903a-dfc26c9f4a87@huaweicloud.com \
    --to=chenridong@huaweicloud.com \
    --cc=cgroups@vger.kernel.org \
    --cc=chenridong@huawei.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llong@redhat.com \
    --cc=lujialin4@huawei.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;
as well as URLs for NNTP newsgroup(s).