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/
Home Products Support Community News


Re: spinlock requests (was RE: [Xen-devel] [Patch] don't spin with irq d

To: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxxxx>, Juergen Gross <juergen.gross@xxxxxxxxxxxxxxxxxxx>
Subject: Re: spinlock requests (was RE: [Xen-devel] [Patch] don't spin with irq disabled)
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Fri, 03 Apr 2009 08:17:24 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 03 Apr 2009 00:18:15 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <d26aa59f-57f6-4542-827b-6dfe0c15e422@default>
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: Acmz6Cuasc0ME0d5QwaiAQfAQme0+gARBCyS
Thread-topic: spinlock requests (was RE: [Xen-devel] [Patch] don't spin with irq disabled)
User-agent: Microsoft-Entourage/
On 03/04/2009 00:08, "Dan Magenheimer" <dan.magenheimer@xxxxxxxxxx> wrote:

>> Well the race is still impossible afaics. Unless your
>> _raw_rw_is_write_locked() was checking for ==0 rather than
>> <=0.
> Finally got a chance to go back and reproduce and figure
> this one out.  The crash is still occurring.  My code
> definitely checks for <=0.  BUT the declaration of
> raw_rwlock_t declares the lock as "volatile UNSIGNED int",
> so the compiler blithely generates a check for == 0.
> Can I assume the fix is to change the declaration to
> int instead of unsigned int, or will that cause problems
> elsewhere?

Oh dear. Yes, that's the fix!

 -- Keir

Xen-devel mailing list

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