From patchwork Fri Oct 6 13:34:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 115064 Delivered-To: patch@linaro.org Received: by 10.80.163.170 with SMTP id s39csp1375938edb; Fri, 6 Oct 2017 06:34:55 -0700 (PDT) X-Google-Smtp-Source: AOwi7QC0RhcRrGBJeCRDI67EpVGekMUA8P7061lWQJ3W4sFN332qqBCTJSRtK9onVV8cOi6H2L91 X-Received: by 10.99.148.17 with SMTP id m17mr2086818pge.114.1507296895690; Fri, 06 Oct 2017 06:34:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507296895; cv=none; d=google.com; s=arc-20160816; b=cqRs10pQxAEF8J9ja2iFDmdQRGSS1Lqn7hPWyRYkSyuKQyAWUKn/mGT0pJBmEKCvR2 s42XMEbf9rMxxrv93WhWHQ6vVk5XGh6ujD3CNXHKKuq9Vu+D6y548F5Lo7IV0BRE37NC ZEX5t5TCW7KIiLGZlPtdAPLwhYnxMAVtrFRjyMtMJnOsOjGlQwSaUlToKqExAP36cBcV IdoJsnhaAu1yQowS5/2BOBRQEBkn9CE4DR7Ns2qQuHUSlXP9qhk/nOahSjOEwkJiV9XK M8ZOG7E/sextaKspRB5KaJ7zddvsqBkK0Ly8lW7zK5SddmiaIYI11jriwz9OInjB7Clm ekHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=A53AK3fK7KGjNUYExvurSi4ve/pNJqvyYqnY/xAi7NQ=; b=kCRsJOtL5cd3Aa9W9pZI/BruCwC3Xvo9k35biNJDx0P/AFj8ZNvw9ObPxyLM2BBluR RvpUncDU+sAiTYD5Z6CWm3yhipOG2AT/YWBmwPGpLXBgMqOqn/v9K0pFswTwa9t0tbMa +8roFrvMQpS3cagBLQcg2EbILouDLmPExXvrBCqBiiq4EDOM2OkDZUeKE55qHvrVYTZT 0kUtplf14/LBILTKRpLlx94KmwkbPoG/sOvy5LEr2PfTPB5khKE2zEqL58p/IK6bP4bp K/nxTSll7wXUGjeRDrbZQZsRz810ZSMe0LIMOyc6kZNmxSfDXAv8gFAHUEyigUwo4jDA rxVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v8si1243371plk.576.2017.10.06.06.34.55; Fri, 06 Oct 2017 06:34:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752689AbdJFNew (ORCPT + 26 others); Fri, 6 Oct 2017 09:34:52 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:33570 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752188AbdJFNem (ORCPT ); Fri, 6 Oct 2017 09:34:42 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CD9951435; Fri, 6 Oct 2017 06:34:41 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 959D93F578; Fri, 6 Oct 2017 06:34:41 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 43D871AE0DBD; Fri, 6 Oct 2017 14:34:43 +0100 (BST) From: Will Deacon To: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Jeremy.Linton@arm.com, peterz@infradead.org, mingo@redhat.com, longman@redhat.com, boqun.feng@gmail.com, paulmck@linux.vnet.ibm.com, Will Deacon Subject: [PATCH v2 0/5] Switch arm64 over to qrwlock Date: Fri, 6 Oct 2017 14:34:37 +0100 Message-Id: <1507296882-18721-1-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, This is version two of the patches I posted yesterday: http://lists.infradead.org/pipermail/linux-arm-kernel/2017-October/534666.html I'd normally leave it longer before posting again, but Peter had a good suggestion to rework the layout of the lock word, so I wanted to post a version that follows that approach. I've updated my branch if you're after the full patch stack: git://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git qrwlock As before, all comments (particularly related to testing and performance) welcome! Cheers, Will --->8 Will Deacon (5): kernel/locking: Use struct qrwlock instead of struct __qrwlock locking/atomic: Add atomic_cond_read_acquire kernel/locking: Use atomic_cond_read_acquire when spinning in qrwlock arm64: locking: Move rwlock implementation over to qrwlocks kernel/locking: Prevent slowpath writers getting held up by fastpath arch/arm64/Kconfig | 17 ++++ arch/arm64/include/asm/Kbuild | 1 + arch/arm64/include/asm/spinlock.h | 164 +------------------------------- arch/arm64/include/asm/spinlock_types.h | 6 +- include/asm-generic/atomic-long.h | 3 + include/asm-generic/qrwlock.h | 20 +--- include/asm-generic/qrwlock_types.h | 15 ++- include/linux/atomic.h | 4 + kernel/locking/qrwlock.c | 83 +++------------- 9 files changed, 58 insertions(+), 255 deletions(-) -- 2.1.4 Tested-by: Waiman Long Tested-by: Jeremy Linton Tested-by: Adam Wallis