From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934348Ab0EEKGv (ORCPT ); Wed, 5 May 2010 06:06:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62777 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932398Ab0EEKGu (ORCPT ); Wed, 5 May 2010 06:06:50 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20100505032033.GA19232@google.com> References: <20100505032033.GA19232@google.com> To: Michel Lespinasse Cc: dhowells@redhat.com, Andrew Morton , Linux-MM , Ying Han , LKML Subject: Re: rwsem: down_read_unfair() proposal Date: Wed, 05 May 2010 11:06:44 +0100 Message-ID: <22994.1273054004@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Michel Lespinasse wrote: > and looks like it's doable with the x86 rwsem implementation as well in a > way that would only involve changes to the rwsem spinlock-protected slow > paths in lib/rwsem.c . It's not as easy as it seems. Once an XADD-based rwsem is contended, you cannot necessarily tell without looking at the queue whether the rwsem is currently write-locked or read-locked. David