Re: [GIT RFC] percpu: use dynamic percpu allocator as the default percpu allocator

Rusty Russell
2009-04-02T00:20:45Z

On Wednesday 01 April 2009 18:47:33 Tejun Heo wrote:
> Martin Schwidefsky wrote:
> > Is the goal to use the same access macros for both dynamically and
> > statically allocated percpu variables? That would make the proposed
> > solution impractical.
>
> Yeah, it's one of the goals so that we don't have to have two sets of
> APIs (e.g. the fast percpu_*() accessors).

There's a weaker, but still useful, subset of this goal: to allow the
ptr versions to access any var (ie. you can do "DEFINE_PER_CPU(int, foo);
... some_func(&foo)) yet still have the get_cpu_var() be the optimized
actual-variable versions.

Don't know that the distinction is *useful* here tho...
Rusty.