Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752383AbdDLRFC (ORCPT ); Wed, 12 Apr 2017 13:05:02 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:51722 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751035AbdDLRE7 (ORCPT ); Wed, 12 Apr 2017 13:04:59 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 3C30F60D6E Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=awallis@codeaurora.org Subject: Re: [RFC PATCH 0/3] arm64: queued spinlocks and rw-locks To: Yury Norov , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Arnd Bergmann , Peter Zijlstra , Catalin Marinas , Will Deacon , Jan Glauber , Ingo Molnar , jason.low2@hp.com References: <1491860104-4103-1-git-send-email-ynorov@caviumnetworks.com> From: Adam Wallis Message-ID: Date: Wed, 12 Apr 2017 13:04:55 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: <1491860104-4103-1-git-send-email-ynorov@caviumnetworks.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2375 Lines: 61 On 4/10/2017 5:35 PM, Yury Norov wrote: > The patch of Jan Glauber enables queued spinlocks on arm64. I rebased it on > latest kernel sources, and added a couple of fixes to headers to apply it > smoothly. > > Though, locktourture test shows significant performance degradation in the > acquisition of rw-lock for read on qemu: > > Before After > spin_lock-torture: 38957034 37076367 -4.83 > rw_lock-torture W: 5369471 18971957 253.33 > rw_lock-torture R: 6413179 3668160 -42.80 > On our 48 core QDF2400 part, I am seeing huge improvements with these patches on the torture tests. The improvements go up even further when I apply Jason Low's MCS Spinlock patch: https://lkml.org/lkml/2016/4/20/725 > I'm not much experienced in locking, and so wonder how it's possible that > simple switching to generic queued rw-lock causes so significant performance > degradation, while in theory it should improve it. Even more, on x86 there > are no such problems probably. > > I also think that patches 1 and 2 are correct and useful, and should be applied > anyway. > > Any comments appreciated. > > Yury. > I will be happy to tests these patches more thoroughly after you get some additional comments/feedback. > Jan Glauber (1): > arm64/locking: qspinlocks and qrwlocks support > > Yury Norov (2): > kernel/locking: #include in qrwlock.c > asm-generic: don't #include in qspinlock_types.h > > arch/arm64/Kconfig | 2 ++ > arch/arm64/include/asm/qrwlock.h | 7 +++++++ > arch/arm64/include/asm/qspinlock.h | 20 ++++++++++++++++++++ > arch/arm64/include/asm/spinlock.h | 12 ++++++++++++ > arch/arm64/include/asm/spinlock_types.h | 14 +++++++++++--- > include/asm-generic/qspinlock.h | 1 + > include/asm-generic/qspinlock_types.h | 8 -------- > kernel/locking/qrwlock.c | 1 + > 8 files changed, 54 insertions(+), 11 deletions(-) > create mode 100644 arch/arm64/include/asm/qrwlock.h > create mode 100644 arch/arm64/include/asm/qspinlock.h > Thanks -- Adam Wallis Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.