Re: [my_cpu_ptr 1/5] Introduce my_cpu_ptr()

From: Christoph Lameter
Date: Wed Jun 03 2009 - 10:09:23 EST


On Sun, 31 May 2009, Rusty Russell wrote:

> > Hmmm.. That would be a major change in semantics.
>
> It's exactly like get_cpu_var. For better or worse, let's not invent YA new
> convention.

It hink we are doing that if we go the get_cpu_ptr line. this_cpu_ptr
starts from per_cpu_ptr() and its straightforward as a special case of
per_cpu_ptr.

> So that name question doesn't really have a clear convention answer: we could
> re-use cpu_local_inc() since I think we decided to kill local_t. I slightly
> prefer it over "this_cpu_*" since we're not actually doing anything to the cpu
> itself, but I don't think anyone will get too confused and think that after
> this executes their CPU will be stepping 11. :)

local is loaded with meaning by glibc where it means thread local. The
variables here are cpu specific, not task specific.

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