Re: [patch 134/149] x86, paravirt: Add a global synchronization point for pvclock

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeremy Fitzhardinge
Date: Wednesday, July 14, 2010 - 2:11 pm

On 07/14/2010 12:40 PM, H.J. Lu wrote:

The question is "what are the real ordering semantics of asm volatile"? 
What ordering is enforced between other asm volatiles?  What ordering is
enforced between asm volatiles and regular memory accesses? asm volatile
and other code?

The documentation discusses this to some extent, but mostly says "there
are no ordering guarantees".  Older versions of gcc - 2.95, for example
- are more explicit, saying that "asm volatiles" won't be moved out of
their basic block (I think that's how I parse it, anyway).

Linux relies on "asm volatile" being ordered at least with respect to
other asm volatiles.  Is this reasonable now?  Will gcc break this at
some point in the future?  If we can't rely on "asm volatile" ordering
semantics, what other mechanism can we use (for example, to order clts
with respect to FPU-using code)?

Thanks,
    J
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [patch 134/149] x86, paravirt: Add a global synchroniz ..., Jeremy Fitzhardinge, (Tue Jul 13, 11:21 am)
Re: [patch 134/149] x86, paravirt: Add a global synchroniz ..., Jeremy Fitzhardinge, (Tue Jul 13, 4:49 pm)
Re: [patch 134/149] x86, paravirt: Add a global synchroniz ..., Jeremy Fitzhardinge, (Wed Jul 14, 10:19 am)
Re: [patch 134/149] x86, paravirt: Add a global synchroniz ..., Jeremy Fitzhardinge, (Wed Jul 14, 10:34 am)
Re: [patch 134/149] x86, paravirt: Add a global synchroniz ..., Jeremy Fitzhardinge, (Wed Jul 14, 10:57 am)
Re: [patch 134/149] x86, paravirt: Add a global synchroniz ..., Jeremy Fitzhardinge, (Wed Jul 14, 11:15 am)
Re: [patch 134/149] x86, paravirt: Add a global synchroniz ..., Jeremy Fitzhardinge, (Wed Jul 14, 1:40 pm)
Re: [patch 134/149] x86, paravirt: Add a global synchroniz ..., Jeremy Fitzhardinge, (Wed Jul 14, 1:58 pm)
Re: [patch 134/149] x86, paravirt: Add a global synchroniz ..., Jeremy Fitzhardinge, (Wed Jul 14, 2:11 pm)
Re: [patch 134/149] x86, paravirt: Add a global synchroniz ..., Jeremy Fitzhardinge, (Wed Jul 14, 2:11 pm)
Re: [patch 134/149] x86, paravirt: Add a global synchroniz ..., Jeremy Fitzhardinge, (Wed Jul 14, 2:11 pm)
Re: [patch 134/149] x86, paravirt: Add a global synchroniz ..., Jeremy Fitzhardinge, (Tue Jul 27, 10:46 am)
xchg() and cmpxchg(), H. Peter Anvin, (Tue Jul 27, 4:57 pm)
[tip:x86/urgent] x86: Add memory modify constraints to xch ..., tip-bot for H. Peter ..., (Tue Jul 27, 10:33 pm)
[tip:x86/asm] x86, asm: Clean up and simplify <asm/cmpxchg.h>, tip-bot for H. Peter ..., (Wed Jul 28, 4:28 pm)
[tip:x86/asm] x86, asm: Move cmpxchg emulation code to arc ..., tip-bot for H. Peter ..., (Thu Jul 29, 1:12 pm)
[tip:x86/asm] x86, asm: Merge cmpxchg_486_u64() and cmpxch ..., tip-bot for H. Peter ..., (Thu Jul 29, 1:13 pm)
Re: [tip:x86/urgent] x86: Add memory modify constraints to ..., Jeremy Fitzhardinge, (Mon Aug 2, 4:51 pm)
Re: [stable] [tip:x86/urgent] x86: Add memory modify const ..., Tomáš Janoušek, (Thu Sep 9, 12:53 pm)
Re: [stable] [tip:x86/urgent] x86: Add memory modify const ..., Tomáš Janoušek, (Thu Sep 9, 2:09 pm)
Re: [stable] [tip:x86/urgent] x86: Add memory modify const ..., Tomáš Janoušek, (Fri Sep 10, 6:10 am)
Re: [stable] [tip:x86/urgent] x86: Add memory modify const ..., Tomáš Janoušek, (Fri Sep 24, 12:17 am)