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: spinlock requests (was RE: [Xen-devel] [Patch] don't spin with irq d

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: Re: spinlock requests (was RE: [Xen-devel] [Patch] don't spin with irq disabled)
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Tue, 31 Mar 2009 21:57:17 +0100
Cc: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>, Juergen Gross <juergen.gross@xxxxxxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 31 Mar 2009 13:58:28 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <49D26857.3010508@xxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcmyMv+Ybburq2zAQEKsNTFDayKt2gAEEbF6
Thread-topic: spinlock requests (was RE: [Xen-devel] [Patch] don't spin with irq disabled)
User-agent: Microsoft-Entourage/12.15.0.081119
On 31/03/2009 20:00, "Jeremy Fitzhardinge" <jeremy@xxxxxxxx> wrote:

>> If we care that much about fairness we should use ticket- or queue-based
>> locks. I don't believe any of our locks are contended enough to be a
>> concern. If they were, that would be a concern in itself.
> 
> Writer vs reader fairness in rwlocks is different from normal spinlock
> fairness.  One presumes that you're expecting to get multiple readers if
> you choose to use a rwlock, but that can end up excluding writers for an
> unbounded amount of time.

I suspect the existing uses of rwlock in Xen actually are because that
seemed a natural fit for the code -- obvious split between reader and writer
critical sections -- rather than because of excessive serialisation if using
a normal spinlock. I strongly disbelieve that lock acquire/release is a
significant performance bottleneck for us right now.

 -- Keir



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