From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 9 18:23:47 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0C93A16A41A for ; Fri, 9 Jun 2006 18:23:47 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB80543D9C for ; Fri, 9 Jun 2006 18:23:42 +0000 (GMT) (envelope-from avg@icyb.net.ua) Received: from [212.40.38.87] (oddity-e.topspin.kiev.ua [212.40.38.87]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id VAA01909 for ; Fri, 09 Jun 2006 21:23:37 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <4489BCA4.5050909@icyb.net.ua> Date: Fri, 09 Jun 2006 21:23:32 +0300 From: Andriy Gapon User-Agent: Thunderbird 1.5.0.2 (X11/20060512) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit Subject: in-flight timer(s) recalibration X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jun 2006 18:23:47 -0000 In-flight timer(s) recalibration - is it a good idea ? How to do it ? This question comes from the following: in 6.1 we use LAPIC timer even on UP systems; in scenarios where FSB frequency can be changed on the fly (this is not hypothetical) that results in bad time-keeping as LAPIC timer frequency is derived from FSB frequency. I'd like to be able to do something like what lapic_setup_clock() does, but through a proper interface and probably at smaller cost (I mean 2 second DELAY). I think that my need is pretty much LAPIC-timer centered because TSC should not be used in my case anyway and i8254 is mutually exclusive with LAPIC (at present, I think) and it is not affected by FSB frequency (is it?). BTW, maybe I will talk utter nonsense now, but is it possible to self-tune timer interrupt frequency by checking time elapsed between interrupts using the best available (or currently selected) timecounter ? -- Andriy Gapon