Re: Question about num_possible_cpus() and cpu_possible_mask

From: Thomas Gleixner
Date: Mon Sep 30 2024 - 05:06:37 EST


On Mon, Sep 30 2024 at 09:56, Peter Zijlstra wrote:
> On Wed, Sep 25, 2024 at 04:04:33AM +0000, Michael Kelley wrote:
>> Question: Is there any intention to guarantee that the cpu_possible_mask is
>> "dense", in that all bit positions 0 thru (nr_cpu_ids - 1) are set, with no
>> "holes"? If that were true, then num_possible_cpus() would be equal to
>> nr_cpu_ids.
>
> I think we've historically had machines where there were holes in. And I
> think we're wanting to have holes in for modern hybrid x86 that have HT,
> although I'm not entirely sure where those patches are atm.
>
> Thomas, didn't we have a patch that renumbers CPUs for hybrid crud sich
> that HT is always the low bit and we end up with holes because the atoms
> don't have HT on?
>
> Or was that on my plate and it got lost in the giant todo pile?

We talked about it some time ago, but that went nowhere.

Thanks,

tglx