From: Keir Fraser Subject: Re: How to increase timer resolution? Date: Sun, 14 Sep 2008 19:11:45 +0100 Message-ID: References: <200809141953.06164.kaiser@informatik.fh-wiesbaden.de> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200809141953.06164.kaiser@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: Robert Kaiser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 14/9/08 18:53, "Robert Kaiser" wrote: > On Sunday 14 September 2008 18:41:05 Keir Fraser wrote: >> 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. > > Aha, the TIME_SLOP constant, right? So is it safe to simply reduce this > to -say- 10us in order to get a 20us resolution? Will check his out as soon > as I have a suitable test machine. Yes, frankly you can set it to zero for your purposes. -- Keir