Re: Q: smp.c && barriers (Was: [PATCH 1/4] generic-smp: remove single ipi fallback for smp_call_function_many())

Ingo Molnar
2009-02-18T17:11:39Z

ok, it's documented:

Intel® 64 and IA-32 Architectures
Software Developer’s Manual
Volume 3A:
System Programming Guide, Part 1

9.5.3 MSR Access in x2APIC Mode

To allow for efficient access to the APIC registers in x2APIC
mode, the serializing semantics of WRMSR are relaxed when
writing to the APIC registers. Thus, system software should not
use “WRMSR to APIC registers in x2APIC mode” as a serializing
instruction. Read and write accesses to the APIC registers will
occur in program order. A WRMSR to an APIC register may
complete before all preceding stores are globally visible;
software can prevent this by inserting a serializing
instruction or MFENCE before the WRMSR.

Ingo