Received: by 2002:a05:7412:8d11:b0:fa:4934:9f with SMTP id bj17csp431821rdb; Mon, 15 Jan 2024 01:50:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IEKBPC5sz7KOQ4B0Qg2Dsa/cOJeeWB9buxFJ1FmPQy1i77PHiyL9DJnxXQgR8pjrsaPH2D8 X-Received: by 2002:a05:6102:48f:b0:467:f017:8eae with SMTP id n15-20020a056102048f00b00467f0178eaemr2832769vsa.24.1705312237384; Mon, 15 Jan 2024 01:50:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705312237; cv=none; d=google.com; s=arc-20160816; b=UAy/LEfStVg3NFXPCq6e83XWZAA884YBPMSla680iBd8LBbbnTtFBxKLuWuGVa9Rjr yOlxuthkfaosLzvbe73EfQ5Yd41eByBd5kzLvm3RA/+UzbgbnSr9BsOyHek6makM68Tp JIGRkxsJHPliKw7CojlrpRA4NcwUovupe6qyaC/PpO1i4jNlXlQFT02odLvcJkiWL1GF dfqEww1jg8CO7q6CIjQEzoBGWd8KEkkC07lKAxuCqw8jGWdJRlHWkVaPZ//frI9T95Pk 1sQuSDWAIzAfaQBWS9MoF0oYwM9EDA8nXYcbck07z0b+3fw91MGD56PkC4Wo/Tm2VYE/ PrtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Sgu6IYMwSIaZwBLviw4pcgKbL7TrqVOn6CZUcPEvEPs=; fh=srb/EijQIrMEdOeqn3qQX6qrsAGyqHAqeSFkl/qDdLM=; b=PMnNaitvCzXloRjU3NckmWkYKE/oQs3zgROSmQG5PUHgyaxBEtXCLtPXvbVIy6WNoH elXDBiRuxABQv05EAw72ct3wuD4qMP34BTh4L0e4+lDCvFvWA3+rDSorpbaN3JHaQz2R /icHA2llEbtte84+uiWX2qGcACTH6Z8iW1BqWGaxNOQWxUkefiRKusJ4ig2v1Awd5uOK ZhOrB4gYZ2cvnJyUdqWKerFxFGffbrA0ca+iIEaErTvnUTJWhWOr8/wJoa2HvItAMt3N wOYSa2jlntk1fAScgW02OwxWEfm1EzOZIMwoZsQ8lsXCiEfEQSPHgeu7aR3exgdaWTkG MtJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="IZ2lc/uZ"; spf=pass (google.com: domain of linux-kernel+bounces-25820-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25820-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id k12-20020a0cf28c000000b0067fd61f5a8asi7530803qvl.301.2024.01.15.01.50.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 01:50:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25820-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="IZ2lc/uZ"; spf=pass (google.com: domain of linux-kernel+bounces-25820-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25820-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 26E991C215A2 for ; Mon, 15 Jan 2024 09:50:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B5B02E549; Mon, 15 Jan 2024 09:50:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IZ2lc/uZ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F0D01D2F5 for ; Mon, 15 Jan 2024 09:50:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 998F1C43390; Mon, 15 Jan 2024 09:50:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705312231; bh=eGRxQIF7PrJgEuijlpw7aixZyzO2hkfFM4iXxKd+Nz8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IZ2lc/uZT2SrNri4LKCvfWvQo3KwcuvbO89HWpQviq7Jga8wMoMuDOXFAfSJig4EV TlSDRh98XRmAsRzDFkJ5QwvzIkD6vQp/lcE3zhxoProqQiqHmYGSLMKRTl8C2Iecep 6IaGSwbWhSxZasXJDHf4BZCpwZTuaY8qmoy4Ln7WjAo4RUxdjvOYp4TN2eZnLMY0Ta XNkrf2qLOBQ2WabzA8k1FoLgQEav9Kh4S5gTGosNg3HArywfCL6T9LLXut57bzMVEH woUeNFUpU0Ae8+MVTL8+h0Bbbeouu+HHXOFPkaBJegrvSzn4VMddlyBTo1w4AEhMe2 WFJU7LCes9V2A== Date: Mon, 15 Jan 2024 17:37:41 +0800 From: Jisheng Zhang To: Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/2] riscv: enable lockless lockref implementation Message-ID: References: <20231202140323.315-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231202140323.315-1-jszhang@kernel.org> On Sat, Dec 02, 2023 at 10:03:21PM +0800, Jisheng Zhang wrote: > This series selects ARCH_USE_CMPXCHG_LOCKREF to enable the > cmpxchg-based lockless lockref implementation for riscv. Then, > implement arch_cmpxchg64_{relaxed|acquire|release}. > > After patch1: > Using Linus' test case[1] on TH1520 platform, I see a 11.2% improvement. > On JH7110 platform, I see 12.0% improvement. > > After patch2: > on both TH1520 and JH7110 platforms, I didn't see obvious > performance improvement with Linus' test case [1]. IMHO, this may > be related with the fence and lr.d/sc.d hw implementations. In theory, > lr/sc without fence could give performance improvement over lr/sc plus > fence, so add the code here to leave performance improvement room on > newer HW platforms. > > Link: http://marc.info/?l=linux-fsdevel&m=137782380714721&w=4 [1] Hi Palmer, this series is also missed, let me know if there's something need to be done. Thanks > > Since v1: > - only select ARCH_USE_CMPXCHG_LOCKREF if 64BIT > > Jisheng Zhang (2): > riscv: select ARCH_USE_CMPXCHG_LOCKREF > riscv: cmpxchg: implement arch_cmpxchg64_{relaxed|acquire|release} > > arch/riscv/Kconfig | 1 + > arch/riscv/include/asm/cmpxchg.h | 18 ++++++++++++++++++ > 2 files changed, 19 insertions(+) > > -- > 2.42.0 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv