Re: [patch V2 10/20] sched/mmcid: Convert mm CID mask to a bitmap
From: Thomas Gleixner
Date: Mon Oct 27 2025 - 05:08:32 EST
On Mon, Oct 27 2025 at 11:15, Shrikanth Hegde wrote:
> On 10/22/25 6:25 PM, Thomas Gleixner wrote:
>> static inline void mm_init_cid(struct mm_struct *mm, struct task_struct *p)
>> @@ -1363,7 +1363,7 @@ static inline void mm_init_cid(struct mm
>> mm->mm_cid.nr_cpus_allowed = p->nr_cpus_allowed;
>> raw_spin_lock_init(&mm->mm_cid.lock);
>> cpumask_copy(mm_cpus_allowed(mm), &p->cpus_mask);
>> - cpumask_clear(mm_cidmask(mm));
>> + bitmap_zero(mm_cidmask(mm), cpumask_size());
>
> Could use num_possible_cpus() here? CID are bound to be less than it no?
Probably.