Re: [patch 00/19] sched: Rewrite MM CID management
From: Florian Weimer
Date: Fri Oct 17 2025 - 07:32:01 EST
* Thomas Gleixner:
> The CID space compaction itself is not a functional correctness
> requirement, it is only a useful optimization mechanism to reduce the
> memory foot print in unused user space pools.
>
> The optimal CID space is:
>
> min(nr_tasks, nr_cpus_allowed);
>
> Where @nr_tasks is the number of actual user space threads associated to
> the mm.
>
> @nr_cpus_allowed is the superset of all task affinities. It is growth
> only as it would be insane to take a racy snapshot of all task
> affinities when the affinity of one task changes just do redo it 2
> milliseconds later when the next task changes its affinity.
How can userspace obtain the maximum possible nr_cpus_allowed value?
Thanks,
Florian