From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E8FDC433E1 for ; Wed, 24 Mar 2021 12:24:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1315961A0E for ; Wed, 24 Mar 2021 12:24:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232025AbhCXMYP (ORCPT ); Wed, 24 Mar 2021 08:24:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234099AbhCXMXx (ORCPT ); Wed, 24 Mar 2021 08:23:53 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0479CC061763 for ; Wed, 24 Mar 2021 05:23:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=4W4nSNFoir5Yp+A6zyQO0RGkUWgdlE6idemxYmJ56sY=; b=HNa43HM8bjAIEOC8TuNxKpdvpJ RRngvoi5SAlttlGmdAU+RtEbVyWEywUKxsfoe5U7FgMeTpC6+yECLW3/qnBB76dIJNYnUhXyxnwZ4 TkJfdGK8yVon0F13EwLmx6iyjynpuGqYCz3vOju9qnjG32f2Zx0VJSEMdtl1JqM/tEYZuAZW9JxzN so2l6sYGMS3lyhsXROmlkfhBRUinANkPT6NP/8h2Cz+9TslepJ7ZyCCMXLcZkDV3QNPcXWBPmeH2G 80cJiamwG6DuQzw8CqPluG/1o6vg6U3IphWsgNnDu5ynrzUA1qEgkAEGTZ1yIMPRH5T3F2hvI+vGm nz4lQ2dg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lP2Y2-00H3X7-VM; Wed, 24 Mar 2021 12:23:43 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 1343F3007CD; Wed, 24 Mar 2021 13:23:42 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id EBBF92BF5B73E; Wed, 24 Mar 2021 13:23:41 +0100 (CET) Date: Wed, 24 Mar 2021 13:23:41 +0100 From: Peter Zijlstra To: Vitaly Wool Cc: guoren@kernel.org, linux-riscv , LKML , Guo Ren , Catalin Marinas , Will Deacon , Palmer Dabbelt , Anup Patel , Arnd Bergmann Subject: Re: [PATCH] riscv: locks: introduce ticket-based spinlock implementation Message-ID: References: <1616580892-80815-1-git-send-email-guoren@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 24, 2021 at 12:15:47PM +0100, Vitaly Wool wrote: > On Wed, Mar 24, 2021, 11:16 AM wrote: > > > From: Guo Ren > > > > This patch introduces a ticket lock implementation for riscv, along the > > same lines as the implementation for arch/arm & arch/csky. > > > > Could you please provide a rationale for this? Like, what is wrong with the > current implementation. test-and-set spinlocks have terrible worst case behaviour. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 095A7C433C1 for ; Wed, 24 Mar 2021 12:25:31 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AACAB61A06 for ; Wed, 24 Mar 2021 12:25:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AACAB61A06 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=tTB2ydNzyMbgCQAhLE6BSFyNybwEgcwuMF2sFleUQGo=; b=MN9BpYKd8wkShHHIlFnYTq2ze yxFCDNe24CLuKY2tgM+DnwQ7PC0MxJ4VYNeFAaeTtKfP/ZTNKIeE66tcIvnOxGpdk5prFsvL30Xh1 iBumRXJlx17mwVG46RdEJDGPHCrJanFvHK00vFQguI3ffam9TXsnF6cg4mSWPAmczOr0QiDpQIOp2 K5kfkq4IfS1wNkD3LC/2Zo3ULhdJrhLEbKczc3AzkomAoaYgx1rJAEMTT50gSmO/I5hhXCadDmfmX tXjXRXfIy7l7+qe7+cH+Gp5eDfyX+8R9YHAvJB+gmUKpPAcI2dbRE17qmi51MyU8tG//QmN0xTDbZ tOcmoKUuQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lP2Zc-00H4Na-NU; Wed, 24 Mar 2021 12:25:21 +0000 Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lP2Y2-00H3X7-VM; Wed, 24 Mar 2021 12:23:43 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 1343F3007CD; Wed, 24 Mar 2021 13:23:42 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id EBBF92BF5B73E; Wed, 24 Mar 2021 13:23:41 +0100 (CET) Date: Wed, 24 Mar 2021 13:23:41 +0100 From: Peter Zijlstra To: Vitaly Wool Cc: guoren@kernel.org, linux-riscv , LKML , Guo Ren , Catalin Marinas , Will Deacon , Palmer Dabbelt , Anup Patel , Arnd Bergmann Subject: Re: [PATCH] riscv: locks: introduce ticket-based spinlock implementation Message-ID: References: <1616580892-80815-1-git-send-email-guoren@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Wed, Mar 24, 2021 at 12:15:47PM +0100, Vitaly Wool wrote: > On Wed, Mar 24, 2021, 11:16 AM wrote: > > > From: Guo Ren > > > > This patch introduces a ticket lock implementation for riscv, along the > > same lines as the implementation for arch/arm & arch/csky. > > > > Could you please provide a rationale for this? Like, what is wrong with the > current implementation. test-and-set spinlocks have terrible worst case behaviour. _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv