Messages in this thread |  | | Date | Thu, 19 Feb 2009 12:01:42 +0100 | | From | Ingo Molnar <> | | Subject | Re: [PATCH 09/10] percpu: implement new dynamic percpu allocator |
| |
* Andrew Morton <akpm@linux-foundation.org> wrote:
> > + * To use this allocator, arch code should do the followings. > > + * > > + * - define CONFIG_HAVE_DYNAMIC_PER_CPU_AREA > > + * > > + * - define __addr_to_pcpu_ptr() and __pcpu_ptr_to_addr() to translate > > + * regular address to percpu pointer and back > > + * > > + * - use pcpu_setup_static() during percpu area initialization to > > + * setup kernel static percpu area > > + */ > > afacit nobody has answered your "is num_possible_cpus() ever a > lot larger than num_online_cpus()" question. > > It is fairly important.
yeah.
On x86 we limit num_possible_cpus() at boot time from NR_CPUS to the BIOS-enumerated set of possible CPUs - i.e. the two will always be either equal, or be very close to each other.
( there used to be broken early BIOSes that enumerated more CPUs than needed but it's very rare and because it also wastes BIOS RAM/ROM it's something they'll usually avoid even if they dont care about Linux. )
So this should be a pretty OK assumption.
Ingo
|  |