From: Keir Fraser Subject: Re: How to increase timer resolution? Date: Sun, 14 Sep 2008 17:41:05 +0100 Message-ID: References: <48CD2C5A.1080208@informatik.fh-wiesbaden.de> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <48CD2C5A.1080208@informatik.fh-wiesbaden.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: kaiser@informatik.fh-wiesbaden.de Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 14/9/08 16:23, "Robert Kaiser (FH)" wrote: > Keir Fraser schrieb: >> set_timer() and friends are already high-resolution, so long as your system >> has a local APIC. This is undoubtedly the case if running a multi-processor >> system. On a uni-processor system you might need to forcibly enable use of >> the APIC with 'lapic' as a Xen boot parameter. >> >> Either way, early during boot you should find a message saying local APIC is >> found and enabled, or not found, or whatever. >> > > Quote: > > (XEN) Local APIC disabled by BIOS -- reenabling. > (XEN) Could not enable APIC! > > Seems like I have to switch to a different testing machine then, the old > notebook I was using doesn't seem to have an APIC :-( > > Do you know what resolution I can expect to get on an APIC-enabled machine? The set_timer() infrastructure is not actually tick-based. With an APIC you'll get timer accuracy of around 100us (this figure because we service timer handlers up to 100us before the deadline specified to set_timer(), just to avoid multiple timer interrupts for close-together events). Without this extra fudge factor you'd get accuracy down to microsecond resolution. -- Keir