[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] cpu barriers moved and x86-64 barriers add
We actually should have wmb() be defined as "asm volatile("":::"memory") since we are not using out of order io. The patch attached removes all the instances and places the definitions in libxc/xc.h as per the discussion last week between Anthony & Keir. Signed-off-by: Jerone Young <jyoung5@xxxxxxxxxx> On Tue, 2005-03-01 at 15:23 -0600, Anthony Liguori wrote: > Keir Fraser wrote: > > > > > On 1 Mar 2005, at 19:56, Jerone Young wrote: > > > >> I would like to discuss is this correct, dead wrong, or even > >> needed at > >> all? > > > > > > x86/64 has proper barrier instructions -- see > > include/asm-x86_64/system.h in Linux. It is from there that we should > > pull our definitions. Barrier macros are defined in a few places in > > the tools -- we ought to pull them all into one single header > > incorporated by all tools that need it. > > I was just about to send this out myself :-) I think the consensus was > to put them all in xc.h. I posted a patch recently that made everything > include asm/system.h. All it should take is replacing asm/system.h with > xc.h in the patch and then making the necessary changes to xc.h. > > For reference, the proper x86-64 barriers are: > > #define mb() asm volatile("mfence":::"memory") > #define rmb() asm volatile("lfence":::"memory") > #define wmb() asm volatile("sfence":::"memory") > > Regards, > Anthony Liguori > -- Jerone Young Open Virtualization IBM Linux Technology Center jyoung5@xxxxxxxxxx 512-838-1157 (T/L: 678-1157) Attachment:
cpu_barrier_patch.diff
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |