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

[Xen-devel] Re: linux c/s 561

To: Jan Beulich <jbeulich@xxxxxxxxxx>
Subject: [Xen-devel] Re: linux c/s 561
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Mon, 02 Jun 2008 08:51:53 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 02 Jun 2008 00:51:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4843C179.76E4.0078.0@xxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcjEhYWHxB+ybTB4Ed2r3wAWy6hiGQ==
Thread-topic: linux c/s 561
User-agent: Microsoft-Entourage/11.4.0.080122
Someone reported they could spin over twenty times before a soon-to-occur
jiffy 'tick' (specifically, the 'jiffies+1' tick) actually occurred. Which
makes sense since the 'slop' in Xen's timer_softirq_action() is 50us and the
cost of block-plus-wakeup-on-VIRQ_TIMER is about a couple of microseconds.
So that's over twenty times setting a timeout less than 50us in the future,
blocking, immediately waking up in the timer ISR, doing no work, setting a
timeout... etc.

So the patch avoids this little corner case. It's not a major issue, and the
side effect is that you may wait a little longer to do timer work.

 -- Keir

On 2/6/08 08:46, "Jan Beulich" <jbeulich@xxxxxxxxxx> wrote:

> Keir,
> 
> this change looks a little odd to me - the code as it was before already
> set the timeout to jiffies + 1 as the lowest possible value. So I don't
> understand how you could have observed any spinning over more than
> really short periods of time (where you happen to just see jiffies
> increment while setting the timeout).
> 
> I'd therefore appreciate any insight to the background of that change.
> 
> Thanks, Jan
> 



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

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