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: [Xen-devel] [PATCH] LAPIC timer accounting fix

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] LAPIC timer accounting fix
From: Gary Grebus <ggrebus@xxxxxxxxxxxxxxx>
Date: Thu, 25 Oct 2007 10:50:50 -0400
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ben Guthro <bguthro@xxxxxxxxxxxxxxx>
Delivery-date: Thu, 25 Oct 2007 07:51:31 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C34663CA.176E2%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: <C34663CA.176E2%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Thu, 2007-10-25 at 15:16 +0100, Keir Fraser wrote:
> On 24/10/07 22:12, "Ben Guthro" <bguthro@xxxxxxxxxxxxxxx> wrote:
> 
> > Offset emulated local APIC timer so it doesn't tick during guest's
> > timer related processing. Otherwise, guests using the local APIC for
> > process accounting can see long sequences of process ticks incorrectly
> > charged to interrupt processing.
> 
> Do they really get in sync like that? Seems a bit odd. Couldn't the same
> happen on real hardware? I wonder why it would be more likely in the
> virtualised case...

Seems like it could happen on real hardware as well.  My guess was that
real hardware timers would drift relative to each other, and make it
less likely.

The failure was seen on a 2.4 kernel (RHEL3) so the default method for
process accounting there might be poor anyway.  There was a program that
failed because it did a large amount of CPU-intensive work but then saw
zero ticks charged to the process.

> Perhaps just offsetting all periodic timers by some random fraction of the
> period would be a simpler patch?

My goal at the time was to move the local APIC timer as far out of sync
as possible, but some random fraction might work as well.

        /gary

-- 
Gary Grebus
Virtual Iron Software, Inc.



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

<Prev in Thread] Current Thread [Next in Thread>