On Wed, Jan 4, 2012 at 7:30 AM, Christoph Lameter <cl@xxxxxxxxx> wrote: > > As mentioned before the main point of the use of these operations (in the > form of __this_cpu_op_return) when the cpu is pinned is to reduce the > number of instructions. __this_cpu_add_return allows replacing ~ 5 > instructions with one. And that's fine if it's something really core, and something *so* important that you can tell the difference between one instruction and three. Which isn't the case here. In fact, on many (most?) x86 microarchitectures xadd is actually slower than a regular add-from-memory-and-store - the big advantage of it is that with the "lock" prefix you do get special atomicity guarantees, and some algorithms (is semaphores) do want to know the value of the add atomically in order to know if there were other things going on. The thing is, I care about maintainability and not having cross-architecture problems etc. And right now many of the cpulocal things are *much* more of a maintainability headache than they are worth. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html