Re: [PATCH] percpu data: only iterate over possible CPUs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 09, 2006 at 08:08:09AM -0800, Nathan Lynch wrote:
> 
>    powerpc/ppc64, for instance, determines the number of possible cpus
>    from information exported by firmware (and I'm mystified as to why
>    other platforms don't do this).  So it's typical to have a kernel an a
>    pSeries partition with NR_CPUS=128, but cpu_possible_map = 0xff.
> 

Iam assuming in the above ase, cpu_possible_map == cpu_present_map and both
dont change after the OS is booted. v.s in platforms capable of hot-plug
cpus present could grow up to cpu_possible_map (max) when a new cpu is
newly added, that wasnt even present at boot time.

The problem was with ACPI just simply looking at the namespace doesnt
exactly give us an idea of how many processors are possible in this platform.

The reason is we could get more added via SSDT dynamically.

on x86_64, we used the number of disabled cpus reported in MADT at boot time
as an indicator to set cpu_possible_map. So if you had 4 sockets, but just
2 populated, the BIOS would set the missing CPUS with disabled flag. We 
simply count the number of disabled CPUs and add to possible map.

Andi added documentation to cover that as well in 
Documentation/x86_64/cpu-hotplug-spec as a guideline for BIOS folks.


-- 
Cheers,
Ashok Raj
- Open Source Technology Center
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux