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] Align periodic vpts to reduce timer interrupts and save

To: "Wei, Gang" <gang.wei@xxxxxxxxx>
Subject: Re: [Xen-devel] Align periodic vpts to reduce timer interrupts and save power
From: Gary Grebus <ggrebus@xxxxxxxxxxxxxxx>
Date: Mon, 09 Feb 2009 13:43:33 -0500
Cc: "Tian, Kevin" <kevin.tian@xxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Mon, 09 Feb 2009 10:44:06 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <8FED46E8A9CA574792FC7AACAC38FE7701CAFAEEC6@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <8FED46E8A9CA574792FC7AACAC38FE7701CAFAEEC6@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Mon, 2009-02-09 at 14:26 +0800, Wei, Gang wrote:
...
> Is there any objections, comments or concerns for such a enhancement?
> 
> BTW, current vpt code try to handle vLAPIC specially to give vLAPIC ticks a 
> offset from other timer ticks like below:
>     pt->scheduled = NOW() + delta;
>     /*
>      * Offset LAPIC ticks from other timer ticks. Otherwise guests which use
>      * LAPIC ticks for process accounting can see long sequences of process
>      * ticks incorrectly accounted to interrupt processing.
>      */
>     if ( pt->source == PTSRC_lapic )
>         pt->scheduled += delta >> 1;
> 
> But I don't think this way can really reach the offset purpose, because the 
> additional (delta >> 1) can't prevent other timers created in other time to 
> expires right before lapic ticks.
> 
> Will it really bring issues if vlapic ticks and vhpet ticks were aligned?

In that case, it was the vlapic timer ticking too close to the pit.  We
saw a userspace application getting the wrong answer because long CPU
bound sequences appeared to run with zero CPU time.  Skewing the vlapic
was sufficient to fix the problem.  This only showed up with old Linux
kernels (IIRC, it was with Red Hat 3 U8). 

If the effect of your proposed change is to always deliver all timer
interrupts to the guest in immediate succession, then I think you will
cause a regression on this problem.

-- 
Gary Grebus
Virtual Iron Software, Inc.



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