lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c665908a-6591-4c9d-93c0-0e69dc831495@huaweicloud.com>
Date: Sat, 30 Aug 2025 09:42:20 +0800
From: Chen Ridong <chenridong@...weicloud.com>
To: Waiman Long <llong@...hat.com>, tj@...nel.org, hannes@...xchg.org,
 mkoutny@...e.com
Cc: cgroups@...r.kernel.org, linux-kernel@...r.kernel.org,
 lujialin4@...wei.com, chenridong@...wei.com
Subject: Re: [PATCH -next RFC 08/11] cpuset: refactor acpus_validate_change



On 2025/8/30 4:12, Waiman Long wrote:
> On 8/28/25 8:56 AM, Chen Ridong wrote:
>> From: Chen Ridong <chenridong@...wei.com>
>>
>> Refactor acpus_validate_change to handle the special case where
>> cpuset.cpus can be set even when violating partition sibling CPU
>> exclusivity rules. This differs from the general validation logic in
>> validate_change. Add a wrapper function to properly handle this
>> exceptional case.
>>
>> Since partition invalidation status can be determined by trialcs->prs_err,
>> the local variable 'bool invalidate' can be removed.
>>
>> Signed-off-by: Chen Ridong <chenridong@...wei.com>
>> ---
>>   kernel/cgroup/cpuset.c | 83 +++++++++++++++++++++++-------------------
>>   1 file changed, 45 insertions(+), 38 deletions(-)
>>
>> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
>> index 71190f142700..75ad18ab40ae 100644
>> --- a/kernel/cgroup/cpuset.c
>> +++ b/kernel/cgroup/cpuset.c
>> @@ -2410,43 +2410,11 @@ static bool invalidate_cs_partition(struct cpuset *cs)
>>       return false;
>>   }
>>   -/**
>> - * update_cpumask - update the cpus_allowed mask of a cpuset and all tasks in it
>> - * @cs: the cpuset to consider
>> - * @trialcs: trial cpuset
>> - * @buf: buffer of cpu numbers written to this cpuset
>> - */
>> -static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs,
>> -              const char *buf)
>> +static int acpus_validate_change(struct cpuset *cs, struct cpuset *trialcs,
>> +                    struct tmpmasks *tmp)
> 
> What does "acpu" stand for? I suppose it means cpus_allowed. I will suggest to use a more
> descriptive name even if it is longer. I did use xcpus for exclusive_cpus, but 'x' is a seldomly
> used English alphabet that can associate with exclusive_cpus rather easily, but 'a' is not.
> 
> Cheers,
> Longman
> 

Thanks Longman,

The term acpus refers to cpus_allowed.

My original naming convention was intended as follows:

acpus  --> cpus_allowed (allowed cpus)
ecpus  --> effective_cpus
xcpus  --> exclusive_cpus
excpus --> effective_xcpus

-- 
Best regards,
Ridong


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ