From owner-freebsd-current@FreeBSD.ORG Fri Oct 28 14:26:26 2005 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BC70A16A41F; Fri, 28 Oct 2005 14:26:26 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD9CA43D46; Fri, 28 Oct 2005 14:26:25 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.48.2]) by phk.freebsd.dk (Postfix) with ESMTP id E0809BC50; Fri, 28 Oct 2005 14:26:23 +0000 (UTC) To: Colin Percival From: "Poul-Henning Kamp" In-Reply-To: Your message of "Fri, 28 Oct 2005 06:47:27 PDT." <43622BEF.3030006@freebsd.org> Date: Fri, 28 Oct 2005 16:26:23 +0200 Message-ID: <32700.1130509583@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: Alexander Leidinger , current@freebsd.org Subject: Re: TSC instead of ACPI: powerd doesn't work anymore (to be expected?) 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, 28 Oct 2005 14:26:26 -0000 In message <43622BEF.3030006@freebsd.org>, Colin Percival writes: >Alexander Leidinger wrote: >> Poul-Henning Kamp wrote: >>> In general, if you run powerd to change your cpu clock (= TSC >>> frequency), using TSC as timecounter is _not_ what you want to do. >> >> Is it not possible to recalibrate on frequency change, or is it "just" that >> nobody wrote the code do to it? > >It's not possible in any useful way. When power management code changes >the TSC frequency, it doesn't change the frequency directly; instead, it >sends a message to the CPU saying "please, if you feel like it, could you >change your frequency to some time soon?" > >Even if you manage to handle the change in frequency, the timecounter >would significantly lose accuracy due to not knowing exactly when the >change in frequency occurred. This is stuff you can calibrate your way out of given enough time, effort and external reference, but a generic solution is not possible. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.