From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: PV guest timings Date: Wed, 27 Nov 2013 10:38:43 +0000 Message-ID: <5295CBB3.8090609@cantab.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Simon Martin , Keir Fraser , "xen-devel@lists.xen.org" Cc: Roland Heusser , Sisu Xi , Andrew Cooper , Dario Faggioli , Joshua Whitehead , Drek Darkover , Nate Studer List-Id: xen-devel@lists.xenproject.org On 26/11/2013 15:38, Simon Martin wrote: > Hi Keir, > >> Are you using the single-shot timer or the periodic timer? > I'm using the single-shot timer. > >> >> How are you calculating clock time? > Copied code in from Mini-OS. To make sure I don't get drift between > deadlines as this is a single shot timer I read monotonic_clock at > startup and then calculate every deadline by incrementing this register > by the period on each timer call. > > As an additional comment. I decided to filter out the samples with > negative latency. This seems to happen 100 times a second, i.e. the 10 > ms Hypervisor timer event. This improves the timings considerably. So it > looks like I'm on the right track looking for ways to distinguish > between timer events. You should disable the periodic timer if you don't need it. VCPUOP_stop_periodic_timer David