在 2026/8/24 22:25, Waiman Long 写道:
> On 8/20/26 8:41 AM, Guopeng Zhang wrote:
>> From: Guopeng Zhang <[email protected]>
>>
>> update_prstate() checks effective_xcpus against the housekeeping masks
>> before changing a partition between root and isolated. effective_xcpus
>> also contains CPUs granted to valid child partitions, although those
>> CPUs are not affected by the parent's type change. A child-owned CPU can
>> therefore reject an otherwise valid change.
>>
>> Run the nohz_full and boot-domain housekeeping checks against the mask
>> of CPUs owned by the partition instead.
>>
>> Fixes: 103b08709e8a ("cgroup/cpuset: Fail if isolated and nohz_full don't 
>> leave any housekeeping")
>> Fixes: b1034a690129 ("cgroup/cpuset: Ensure domain isolated CPUs stay in 
>> root or isolated partition")
>> Signed-off-by: Guopeng Zhang <[email protected]>
>> ---
>>   kernel/cgroup/cpuset.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
>> index 468272baadb2..853942c1afeb 100644
>> --- a/kernel/cgroup/cpuset.c
>> +++ b/kernel/cgroup/cpuset.c
>> @@ -3019,8 +3019,8 @@ static int update_prstate(struct cpuset *cs, int 
>> new_prs)
>>            */
>>           compute_partition_owned_cpumask(cs, tmpmask.new_cpus);
>>           if (((new_prs == PRS_ISOLATED) &&
>> -             !isolated_cpus_can_update(cs->effective_xcpus, NULL)) ||
>> -            prstate_housekeeping_conflict(new_prs, cs->effective_xcpus))
>> +             !isolated_cpus_can_update(tmpmask.new_cpus, NULL)) ||
>> +            prstate_housekeeping_conflict(new_prs, tmpmask.new_cpus))
>>               err = PERR_HKEEPING;
>>           else
>>               isolcpus_updated = true;
> 
> This can be merged into patch 4. This is basically the same change as in 
> patch 4.
> 

That makes sense. I have folded the two changes together in v2.

Thanks,
Guopeng

Reply via email to