From: Keir Fraser Subject: Re: Linux questions Date: Tue, 04 Dec 2007 11:56:51 +0000 Message-ID: References: <20071204114405.GB10287@one.firstfloor.org> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20071204114405.GB10287@one.firstfloor.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Andi Kleen Cc: xen-devel@lists.xensource.com, Jan Beulich , Samuel Thibault List-Id: xen-devel@lists.xenproject.org On 4/12/07 11:44, "Andi Kleen" wrote: >> I must disagree! And I *know* that RDTSC is not a serialising instruction... >> >> If we race, then there was an interrupt. Interrupt delivery is a >> serialisation point for the interrupted instruction stream. > > The synchronization relies on the RDTSC happening between the > two sequence number checks. Otherwise you can get inconsistent state > between RDTSC and the xtime data which might be changing asynchronously > on another CPU. Therefore you need RDTSC barriers. Our monotonic_clock() implementation does not reference xtime nor its seqlock. If it did, you would be correct. -- Keir