From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: [PATCHv3 0/2] spinlock: queued read-write locks Date: Mon, 1 Feb 2016 11:31:11 +0000 Message-ID: <1454326273-23588-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.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aQChX-00024A-Qm for xen-devel@lists.xenproject.org; Mon, 01 Feb 2016 11:31:23 +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: David Vrabel , Jan Beulich , Ian Campbell List-Id: xen-devel@lists.xenproject.org This series replaces the current read-write lock implementation with the queued 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. Changes in v3: - Fix CONFIG_XSM build. 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