[PATCH v2] ring-buffer: Replace this_cpu_*() with __this_cpu_*()

Christoph Lameter cl at linux.com
Thu Mar 19 09:33:30 PDT 2015


If you are redoing it then please get the comments a bit cleared up. The
heaviness of the fallback version of this_cpu_read/write can usually
easily be remedied by arch specific definitions. The per cpu
offset is somewhere in a register and one needs to define a macro that
creates an instruction that does a fetch from that register plus
the current offset into the area that is needed. This is similarly easy
for the write path. But then its often easier to just use the __this_cpu
instructions since preemption is often off in these code paths.

I have had code for IA64 in the past that does this.




More information about the linux-arm-kernel mailing list