From owner-freebsd-current@FreeBSD.ORG Fri Apr 18 17:54:48 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E0D71065672 for ; Fri, 18 Apr 2008 17:54:48 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outP.internet-mail-service.net (outp.internet-mail-service.net [216.240.47.239]) by mx1.freebsd.org (Postfix) with ESMTP id 04BA68FC1C for ; Fri, 18 Apr 2008 17:54:47 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Fri, 18 Apr 2008 22:00:28 -0700 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 1EC3B2D6010; Fri, 18 Apr 2008 10:54:47 -0700 (PDT) Message-ID: <4808E06D.8020304@elischer.org> Date: Fri, 18 Apr 2008 10:54:53 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: Poul-Henning Kamp References: <51610.1208498408@critter.freebsd.dk> In-Reply-To: <51610.1208498408@critter.freebsd.dk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: gnn@freebsd.org, freebsd-current@freebsd.org, Andrew Gallatin Subject: Re: TSC Timecounter and multi-core/SMP X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2008 17:54:48 -0000 Poul-Henning Kamp wrote: > In message <48080276.3040203@elischer.org>, Julian Elischer writes: >> David O'Brien wrote: >> >>> The TSC on K8 is not invariant - its rate of change is affected by >>> P-state changes. >>> >>> The TSC on Greyhound (Family 10h) is invariant. >>> [but as stated above, is not synced with other cores] >> You'd think that an invariant sync'd clock (fast to read) of some >> type would have been done by someone by now.. The software people >> have been asking for this for the last decade at least. > > Actually one of the original design documents for SAGE stressed that > such hardware were crucially important "for any system operating > in real time", so yes, the HW people have had adequate notices. > > Poul-Henning > > I'm certain that earlier systems had it as a requirement but I wasn't willing to lump the IBM 407 or 1620 in to the same bucket as an SMP PC with the ability to change the frequency on each CPU. I remember that the MP vaxen and PDPs had good timers.. and I'm certain the MP IBMs did too. How hard can it be? An instruction that gives a 64 bit counter, in some reasonable granularity that is run at the same speed for all CPUS in a system regardless of the speed each cpu is running.. While nsecs would be nice even usecs might do. They don't even have to be in sync as long as the offset between them is constant (though that would be nice). Bonus points for being able to read it from user space. The hardware people don't seem to realise the importance of this. and keep throwing it out to gain/save a pin or to save some transistors for some other feature.