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] VMX: avoid taking locks with irqs disabled

To: 'Keir Fraser' <keir.fraser@xxxxxxxxxxxxx>, Tim Deegan <Tim.Deegan@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH] VMX: avoid taking locks with irqs disabled
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Tue, 21 Oct 2008 20:29:16 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "Wei, Gang" <gang.wei@xxxxxxxxx>
Delivery-date: Tue, 21 Oct 2008 05:29:47 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C5221735.1E596%keir.fraser@xxxxxxxxxxxxx>
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: <20081020093023.GM3780@xxxxxxxxxxxxxxxxxxxxx> <C5221735.1E596%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Ackym9FTECaiOJ6PEd2A7gAWy6hiGQA2pAsQ
Thread-topic: [Xen-devel] [PATCH] VMX: avoid taking locks with irqs disabled
>From: Keir Fraser
>Sent: Monday, October 20, 2008 6:09 PM
>
>Oh yes. That's a class of race that I hadn't realised would be
>introduced by
>the new rendezvous code. Spinlocks which are ever taken with
>IRQs disabled
>must *always* be taken with IRQs disabled. Spinlocks which are
>ever taken
>with IRQs enabled must *always* be taken with IRQs enabled.

We encountered a similar bug today, when Jimmy is developing
FSB HPET broadcast feature. The reason is same that above
guideline is not obeyed.


>
>It's quite an extra constraint on spinlock usage actually. :-(
>
>Actually this new partitioning of locks into two equivalence classes is
>begging for some run-time checking in debug builds. I'll sort
>out a patch
>for that.
>

Did you flush out the patch into xen bits? I guess there may
be other instances breaking that guideline. Just curious whether
Linux side already recognized similar constraints. It's possibly
not. Then another angle is, instead of pushing constraint on
spinlock usage, could we instead change timer rendezvous
style? Use softirq instead of call function should release the
constraints like stop_machine. :-)

Thanks,
Kevin

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