Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp33929pxf; Wed, 24 Mar 2021 20:04:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHpJbhq3VXmKu7ZDY9IwKldG8sJ5MnCKqJgO2zfX3N2YU+2/DkM0AMrRmXVmYq7Su4wmB5 X-Received: by 2002:a17:906:c08f:: with SMTP id f15mr7039733ejz.318.1616641452208; Wed, 24 Mar 2021 20:04:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616641452; cv=none; d=google.com; s=arc-20160816; b=UWldzf/vfho2BcenxGB+GgY8Y7Vuo0S61rAJfTeoH/1wNWEU3WNQragpv6YQAjePLu 6HY7bF5D5QSySM4Qk5ptlu5A7HXGPW+RQXAFPfdsZCCFNLI1vzax9IJYgsegp3qxjBN+ 38DSfO3OK5/I3tkzrVh2/vr1vNyxAG1f9X4b+gIXkcSnAXPi1uibUG918kGe4UP7X8yM griilSp59voDFE2f8NZfFcDbDDwEKdJGf/ioALbLug4XC1htgJ/tGy2xPuMaQLdsgHem stWBY/UmCqvg3ppctZTkC9YPcrmrqyc+uHUVdJutn4DiC5EVI7TuFKkYa8kvl73w4Asw DKvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4W4nSNFoir5Yp+A6zyQO0RGkUWgdlE6idemxYmJ56sY=; b=mbuGAdhFovM+rMF8ob/gHnln2pqDuQbQJYsCVfwGmLqwRvWwoRG1Yn8o9Mc//uRZOb qRZXQAZ3KLK4D9GSSORJArjsQBNiAL8b/ew4qLY81lS9jHvExiD20C8LX145JLvGZmNA rN0qJKog9bfjlI/n3XRva/EbTfEH15ke1Zarxp1MFdjfN3XUG8RFLmSmnUr6Ajw5A/Jq U2DKzt4mDoFd5eFO2hVZTACrzHWYeSGTnFyv2A7s2YgdyniQ/SWsr4zttsr2s9a30iiU hxZUfrvwoWlrGwT3bMSyxJk5tD6zeapl1sgrFDgsB81Bz4v02G9StojmmtQPuUKq9kKH /cpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=HNa43HM8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r5si3059775ejr.410.2021.03.24.20.03.49; Wed, 24 Mar 2021 20:04:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=HNa43HM8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232689AbhCXMYO (ORCPT + 99 others); Wed, 24 Mar 2021 08:24:14 -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.