WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: (progress on hpet accuracy) and Re: [Xen-devel] [PATCH] Add a timer

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: (progress on hpet accuracy) and Re: [Xen-devel] [PATCH] Add a timer mode that disables pending missed ticks
From: Dave Winchell <dwinchell@xxxxxxxxxxxxxxx>
Date: Wed, 05 Mar 2008 12:25:24 -0500
Cc: "dan.magenheimer@xxxxxxxxxx" <dan.magenheimer@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Deepak Patel <deepak.patel@xxxxxxxxxx>, Dave Winchell <dwinchell@xxxxxxxxxxxxxxx>
Delivery-date: Tue, 11 Mar 2008 11:04:02 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C3F46AB4.1D82B%Keir.Fraser@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C3F46AB4.1D82B%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929)
Keir Fraser wrote:

On 5/3/08 15:06, "Dave Winchell" <dwinchell@xxxxxxxxxxxxxxx> wrote:

As for the code structure, I tried layering on vpt.c and had trouble
doing so. Therefore, I focused on a direct approach. I'll describe the
approach
shortly, after I run tests with other loads and guests.

Are you targeting only 64-bit Linux guests? 32-bit Linux cannot tolerate
missed ticks, and I want only one missed-tick algorithm in Xen: currently
that is vpt.c.
No, my results are for 32 bit Linux as well, at least 4u432.
It turns out that for hpet, (rh4u4) 32 bit Linux does handle missed ticks.
I need to try other 32 bit Linux versions, as well as Windows, to see how
broad this behaviour is.

Looking at the code for 2.6.20, it appears to me that if CONFIG_GENERIC_TIME
is set then missed ticks are handled for hpet for 32 bit and 64
bit Linux (see update_wall_time() and read_hpet()).

In 2.6.9, it looks like cur_timer->mark_offset() call from timer_interrupt in 32 bit arch/i386/kernel/time.c invokes, for hpet, mark_offset_hpet(), which computes
missed ticks based on hpet counter. mark_offset_pit() does nothing.
mark_offset_tsc() does compute missed ticks.

In 64 bit 2.6.9, the timer_interrupt() in arch/x86_64/time.c does hpet
reads directly HPET_T0_CMP, HPET_COUNTER to calculate missed ticks.

So from the code perspective, it looks like missed ticks are computed for 32
and 64 bit Linux using hpet clocksource.

regards,
Dave

-- Keir




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel