Re: [RFC 00/15] x86_64: Optimize percpu accesses

From: Jeremy Fitzhardinge
Date: Thu Jul 10 2008 - 13:53:25 EST


Christoph Lameter wrote:
The nice thing about the non-zero-based scheme i386 uses is that setting
gs-base to zero means that percpu variables accesses get directly to the
prototype percpu data area, which simplifies boot time setup (which is
doubly awkward on 32-bit because you need to generate a GDT entry rather
than just load an MSR as you do in 64-bit).

Great but it causes trouble in other ways as discussed.

What other trouble? It works fine.

Its best to consistently access
per cpu variables using the segment registers.


It is, but initially the segment base is 0, so just using a percpu variable does something sensible from the start with no special setup.

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