Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261162AbVE3TYN (ORCPT ); Mon, 30 May 2005 15:24:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261647AbVE3TYN (ORCPT ); Mon, 30 May 2005 15:24:13 -0400 Received: from colin.muc.de ([193.149.48.1]:53263 "EHLO mail.muc.de") by vger.kernel.org with ESMTP id S261162AbVE3TYJ (ORCPT ); Mon, 30 May 2005 15:24:09 -0400 Date: 30 May 2005 21:24:08 +0200 Date: Mon, 30 May 2005 21:24:08 +0200 From: Andi Kleen To: Vojtech Pavlik Cc: Kyle Moffett , Chris Friesen , john cooper , linux-kernel@vger.kernel.org Subject: Re: spinaphore conceptual draft Message-ID: <20050530192408.GA25794@muc.de> References: <934f64a205052715315c21d722@mail.gmail.com> <429B289D.7070308@nortel.com> <20050530164003.GB8141@muc.de> <429B4957.7070405@nortel.com> <02485B05-6AE5-4727-8778-D73B2D202772@mac.com> <20050530184059.GA2222@ucw.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050530184059.GA2222@ucw.cz> User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1104 Lines: 26 > > >I suspect any attempt to use time stamps in locks is a bad > > >idea because of this. > > > > Something like this could be built only for CPUs that do support that > > kind of cycle counter. > > RDTSC on older Intel CPUs takes something like 6 cycles. On P4's it > takes much more, since it's decoded to a microcode MSR access. It actually seems to flush the trace cache, because Intel figured out that out of order RDTSC is probably not too useful (which is right) and the only way to ensure that on Netburst seems to stop the trace cache in its track. That can be pretty slow, we're talking 1000+ cycles here. Now on the other hand if you only execute it in the slow path of a lock it might not be that bad (since the machine should be pretty synchronized at this point anyways), but still it is probably not something you want to do often. -Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/