Re: [PATCH] percpu: add optimized generic percpu accessors

From: H. Peter Anvin
Date: Thu Jan 15 2009 - 20:10:23 EST


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
--
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/