[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090219110142.GH2354@elte.hu>
Date: Thu, 19 Feb 2009 12:01:42 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Tejun Heo <tj@...nel.org>, rusty@...tcorp.com.au,
tglx@...utronix.de, x86@...nel.org, linux-kernel@...r.kernel.org,
hpa@...or.com, jeremy@...p.org, cpw@....com
Subject: Re: [PATCH 09/10] percpu: implement new dynamic percpu allocator
* Andrew Morton <akpm@...ux-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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists