From owner-cvs-src@FreeBSD.ORG Tue Oct 18 17:10:40 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0AAFF16A41F; Tue, 18 Oct 2005 17:10:40 +0000 (GMT) (envelope-from nate@root.org) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id A9A6043D45; Tue, 18 Oct 2005 17:10:39 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.120.198.17] ([209.101.72.251]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id j9IHAaxq015714 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 18 Oct 2005 10:10:37 -0700 Message-ID: <43552C4D.7060802@root.org> Date: Tue, 18 Oct 2005 10:09:33 -0700 From: Nate Lawson User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Nate Lawson References: <20051018094402.A29138@grasshopper.cs.duke.edu> <68671.1129643256@critter.freebsd.dk> <17237.286.236279.883806@grasshopper.cs.duke.edu> <435527DD.3040007@root.org> In-Reply-To: <435527DD.3040007@root.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: cvs-src@FreeBSD.org, Poul-Henning Kamp , src-committers@FreeBSD.org, Andrew Gallatin , cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/amd64/amd64 cpu_switch.S machdep.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 17:10:40 -0000 Nate Lawson wrote: > Andrew Gallatin wrote: > >> Poul-Henning Kamp writes: >> > In message <20051018094402.A29138@grasshopper.cs.duke.edu>, Andrew >> Gallatin wri >> > tes: >> > > >It is a shame we can't find a way to use the TSC as a >> timecounter on >> > >SMP systems. It seems that about 40% of the context switch time is >> > >spent just waiting for the PIO read of the ACPI-fast or i8254 to >> > >return. >> > > No, the shame is that the scheduler tries to partition time rather >> > than cpu cycles because that approximation got goldplated in some >> > random standard years back. >> >> Sorry if I mi-spoke. I guess the shame twofold. >> First we insist on not trying keep the TSC in sync and so we don't use >> it for SMP timekeeping like other OSes do, which means that getting a >> micro-second granularity timestamp is orders of magnitude more >> expensive for us. To compound the problem, we insist on using the >> expensive non-TSC binuptime() to get a runtime measurement on each >> context switch, rather than being able to use something cheap like >> ticks, or a per-cpu cycle counter. > > > I have good information that in the near future, most designs will have > guaranteed synchronized TSC across all CPUs. Oops, I not only meant "synchronized" but also "the same value". -- Nate