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] don't spin with irq disabled

To: "Juergen Gross" <juergen.gross@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [Patch] don't spin with irq disabled
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Thu, 26 Mar 2009 12:23:14 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 26 Mar 2009 05:22:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <49CB441E.9030006@xxxxxxxxxxxxxxxxxxx>
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: <49CB441E.9030006@xxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> Juergen Gross <juergen.gross@xxxxxxxxxxxxxxxxxxx> 26.03.09 10:00 >>>
>Attached patch reduces interrupt latency in lock handling.
>spin_lock_irq and spin_lock_irqsave used to turn off IRQs and then tried to
>get the lock. If the lock was already held, waiting for the lock was done with
>IRQs still off.
>The patch reenables IRQs during the wait loop.

This is wrong - you must not enable interrupts if they weren't enabled upon
entry to these two functions.

Jan


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