From mboxrd@z Thu Jan 1 00:00:00 1970 From: Waiman Long Subject: [PATCH RFC 0/2] qrwlock: Introducing a queue read/write lock implementation Date: Fri, 12 Jul 2013 21:34:07 -0400 Message-ID: <1373679249-27123-1-git-send-email-Waiman.Long@hp.com> Return-path: Received: from g4t0014.houston.hp.com ([15.201.24.17]:42465 "EHLO g4t0014.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757984Ab3GMBen (ORCPT ); Fri, 12 Jul 2013 21:34:43 -0400 Sender: linux-arch-owner@vger.kernel.org List-ID: To: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Arnd Bergmann Cc: Waiman Long , linux-arch@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Steven Rostedt , Andrew Morton , Richard Weinberger , Catalin Marinas , Greg Kroah-Hartman , Matt Fleming , Herbert Xu , Akinobu Mita , Rusty Russell , Michel Lespinasse , Andi Kleen , Rik van Riel , "Paul E. McKenney" , Linus Torvalds , "Chandramouleeswaran, Aswin" , "Norton, Scott J" This patch set introduces a queue-based read/write implementation that is both faster and fairer than the current read/write lock. It can also be used as a replacement for ticket spinlocks that are highly contended if lock size increase is not an issue. There is no change in the interface. By just replacing the current read/write lock with the queue read/write lock, we can have a faster and more deterministic system. Signed-off-by: Waiman Long Waiman Long (2): qrwlock: A queue read/write lock implementation x86 qrwlock: Enable x86 to use queue read/write lock arch/x86/Kconfig | 3 + arch/x86/include/asm/spinlock.h | 2 + arch/x86/include/asm/spinlock_types.h | 4 + include/asm-generic/qrwlock.h | 124 +++++++++++++++++ lib/Kconfig | 11 ++ lib/Makefile | 1 + lib/qrwlock.c | 246 +++++++++++++++++++++++++++++++++ 7 files changed, 391 insertions(+), 0 deletions(-) create mode 100644 include/asm-generic/qrwlock.h create mode 100644 lib/qrwlock.c