From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: [PATCHv2 0/4] spinlock: queue read-write locks Date: Tue, 26 Jan 2016 16:25:09 +0000 Message-ID: <1453825513-1611-1-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aO6RE-00049g-0V for xen-devel@lists.xenproject.org; Tue, 26 Jan 2016 16:25:52 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Andrew Cooper , Jennifer Herbert , David Vrabel , Jan Beulich , Ian Campbell List-Id: xen-devel@lists.xenproject.org This series replaces the current read-write lock implementation with the queue read-write locks from Linux. These are fair; under contention both readers and writers will be queued and obtain the lock in FIFO order (due to the fairness of the internal ticket lock). The implementation is all in C and thus architecture independent. Compared to the Linux implementation some of the memory barrier primitives were changed. The ARM maintainers may want to give this area a careful review. Significant changes in v2: - atomic_cmpxchg() is now arch-dependent as arm/arm64 already provided their own. - Moved rwlocks into their own file. - Removed the special casing of in_irq() in the slow read path. David