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

From: Rusty Russell
Date: Wed Apr 01 2009 - 20:20:46 EST


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.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/