Message ID | 1524738868-31318-5-git-send-email-will.deacon@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 36BBF602DC for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 26 Apr 2018 10:59:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21D0928FAC for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 26 Apr 2018 10:59:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 159A028FB4; Thu, 26 Apr 2018 10:59:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6B31B28FAC for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 26 Apr 2018 10:59:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=lOnh/u5lFCLFEIfbKJTeVxsJaLEnsFV1K3lFAB6rE2o=; b=hS7KzToC6khe+Sixz8DVlD4g4J CRuX9dM6w/VlL4Q1cjI6ElYYtd3PWMBVP+Ln71TrsleYab5P24YNyNYfik7wUMvJlP2h5ww8F7O7p O3KwnR7TozJK/xBm+83IfKY4u3APYvjBRbGa4J6OdMZCYQllQ3I3l0hRyacHwv7wzFg9DrQJXsGKn 1ix+E09B3TIDXqnltNPHUixFqrkjlpWfguAW9zDRe51+8LJqFSduMFa8srpx9drVjC7jDneiQ839m CT7/JLkhWk0S090Q3Da8/49jrpY++0oQvQuR/HURR/LDMNOvzoS+Qyg0KdkFG9/Uv5Q9NLmcp19nT spkZLICg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fBecK-00020O-VG; Thu, 26 Apr 2018 10:59:12 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fBeT3-00042P-DD for linux-arm-kernel@bombadil.infradead.org; Thu, 26 Apr 2018 10:49:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=N6DvhPmlmCuRy8VmGQHWq4TvcqHsUTaCg374LC/OgXE=; b=Qks0ERWomeDc6m/YrKF0c/Mc0 umXhV7uX95roLcjrw+YpHTaeE5nAADh9gcXScEkMIO7Ezn/3R5IOoqzuJp1aQx3Fklbth5XLkoqm3 xd9fGpLoMlzarPWuqwyEVSNJ9KKvNsQ3S0hQirh2eSVQAN2Pcn3+XaF860ZQ9STrGv2YEOyS2bsl9 BVh0bHbifrZIIZ6b6URqQKGeph2f8LjjJLHcJzPcQNU9CcvQnSr6mTFLNlmX+hmfHcGcoPOIbzt3V bfu8fSlKmJYQjJgIbsoPMptPus/EwBkySvgwuq0cfIxwsed7yxaQ/tmwRBCcyPSm7r+TAWnDxV+d5 Pns8PJCxg==; Received: from foss.arm.com ([217.140.101.70]) by casper.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fBeEG-0006x9-La for linux-arm-kernel@lists.infradead.org; Thu, 26 Apr 2018 10:34:22 +0000 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 95BEC169F; Thu, 26 Apr 2018 03:34:09 -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 6640D3F77A; Thu, 26 Apr 2018 03:34:09 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 16A001AE50EB; Thu, 26 Apr 2018 11:34:29 +0100 (BST) From: Will Deacon <will.deacon@arm.com> To: linux-kernel@vger.kernel.org Subject: [PATCH v3 04/14] locking/qspinlock/x86: Increase _Q_PENDING_LOOPS upper bound Date: Thu, 26 Apr 2018 11:34:18 +0100 Message-Id: <1524738868-31318-5-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1524738868-31318-1-git-send-email-will.deacon@arm.com> References: <1524738868-31318-1-git-send-email-will.deacon@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180426_113420_839571_F4C08FC0 X-CRM114-Status: GOOD ( 11.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: peterz@infradead.org, boqun.feng@gmail.com, will.deacon@arm.com, longman@redhat.com, paulmck@linux.vnet.ibm.com, mingo@kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/arch/x86/include/asm/qspinlock.h b/arch/x86/include/asm/qspinlock.h index 90b0b0ed8161..da1370ad206d 100644 --- a/arch/x86/include/asm/qspinlock.h +++ b/arch/x86/include/asm/qspinlock.h @@ -7,6 +7,8 @@ #include <asm-generic/qspinlock_types.h> #include <asm/paravirt.h> +#define _Q_PENDING_LOOPS (1 << 9) + #define queued_spin_unlock queued_spin_unlock /** * queued_spin_unlock - release a queued spinlock
On x86, atomic_cond_read_relaxed will busy-wait with a cpu_relax() loop, so it is desirable to increase the number of times we spin on the qspinlock lockword when it is found to be transitioning from pending to locked. According to Waiman Long: | Ideally, the spinning times should be at least a few times the typical | cacheline load time from memory which I think can be down to 100ns or | so for each cacheline load with the newest systems or up to several | hundreds ns for older systems. which in his benchmarking corresponded to 512 iterations. Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@kernel.org> Suggested-by: Waiman Long <longman@redhat.com> Signed-off-by: Will Deacon <will.deacon@arm.com> --- arch/x86/include/asm/qspinlock.h | 2 ++ 1 file changed, 2 insertions(+)