From: Keir Fraser Subject: Re: spinlock requests (was RE: [Patch] don't spin with irq disabled) Date: Tue, 31 Mar 2009 14:48:18 +0100 Message-ID: References: <49D21D44.6070600@fujitsu-siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <49D21D44.6070600@fujitsu-siemens.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Juergen Gross , Dan Magenheimer Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 31/03/2009 14:40, "Juergen Gross" wrote: > Dan Magenheimer wrote: >> Thanks Juergen. Do you know of any GPLv2 code that implements >> this improved rwlock solution? (I don't think Linux does, >> does it?) > > Good question. > I just looked into the Linux code and decided not to analyse it. :-) > I have implemented a solution for our BS2000 system on Xen. It is just > a rather simple state machine using the cmpxchg instruction for the > update of the (structured) lock word. > If there is common interest for this solution I could prepare a patch. 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. -- Keir