lkml.org 
[lkml]   [2009]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2009-02-19 12:05    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog