Messages in this thread | | | Date | Thu, 15 Jan 2009 17:09:39 -0800 | From | "H. Peter Anvin" <> | Subject | Re: [PATCH] percpu: add optimized generic percpu accessors |
| |
Ingo Molnar wrote: >> >> So if you could design the API such that we have a variant of add/inc >> that automatically disables/enables preemption then we can optimise that >> away on x86. > > Yeah. percpu_add(var, 1) does exactly that on x86. >
And even on architectures which can only do percpu inc/dec we can make the right thing happen for a constant here, so we really don't need a new interface. This is a good thing.
-hpa
| |