Re: irqsafe_cpu_...() 64-bit operations on 32-bit platform

From: Christoph Lameter
Date: Tue Jan 03 2012 - 11:37:27 EST


On Mon, 2 Jan 2012, Jan Beulich wrote:

> > However, if you are using a loop to sum up all counters from every
> > processor then you cannot use the this_cpu ops but would have to use
> > something like get_64().
>
> I understand that, but again statistics aren't my focus here.

Ok then we need to understand better what you are trying to accomplish.
You may be outside of the realm of percpu data and be just trying to read
and write 64 bit variables reliably on 32 bit?

> Correct, but it would appear to be a read even to the compiler (only
> the actual assembly implementation would have to know that it's
> really a write).

I have had code like that floating around 2 years ago but there did not
seem to be a use case so I never merged it.

Do you have some code in the tree where I could see how you would use such
an operation?
--
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/