On Saturday 31 May 2008 04:00:40 Christoph Lameter wrote:
Christoph!
STOP typing, and START reading.
cpu_local_inc() does all this: it takes the name of a local_t var, and is
expected to increment this cpu's version of that. You ripped this out and
called it CPU_INC().
Do not make me explain it a third time.
Think for a moment. What are the chances that I didn't understand this when I
wrote the multiple implementations of local_t?
You are wasting my time explaining the obvious, and wasting your own.
Frankly, I am finding it increasingly easy to believe that you failed. But
you are blaming the wrong thing.
There are three implementations of local_t which are obvious. The best is for
architectures which can locate and increment a per-cpu var in one instruction
(eg. x86). Otherwise, using atomic_t/atomic64_t for local_t provides a
general solution. The other general solution would involve
local_irq_disable()/increment/local_irq_enable().
My (fading) hope is that this idiocy is an abberation,
Rusty.
--