Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1023030pxb; Fri, 15 Apr 2022 18:41:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXatL2cWAfDiirouWucmp5rmp6K8bGPKsyZwbe6ym0Oohc4tSFj0CLNH9AlHUAGsSQ9IeL X-Received: by 2002:a17:903:11d0:b0:155:c240:a2c0 with SMTP id q16-20020a17090311d000b00155c240a2c0mr1556434plh.143.1650073264970; Fri, 15 Apr 2022 18:41:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650073264; cv=none; d=google.com; s=arc-20160816; b=RGSARtRLTDe18inPWeTINVFi31n/jB+gnXPE8HQ4NzHheNAwyAqQAnjNh0AddxMwrh djR0uOY3Kgr4B+nPozLLrr1LsK4fRXKrpdcOH+rPVZntqEUJ1AlIqUMCSqCxmmcGPkSh mnBEymIbHEnqG8nfKEG1mzhHKLGNfozdFJV6Q97inP5BFbn2ZQwT47MoiclVskyP/VhV m34TX3OqvtjqvoXxZdaNKSyYzppGJjaCWNUvIlkNAANRmw/fDhmBN8E4lN9Ev3e9dHh6 dt+htUHs+4x99vU4Rs6/aL1lsoQpMwWz6W7Gu0YTNrzQS9geNRF2a7rh3oLO8yEUobGd 73Yw== 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=1YdLQXxMOH03x0SbnGmKpWrPU6dm2R7TxKypWUEVbgQ=; b=jcUw0TyuxUHw/LG+zhu5VYXpQNiUJdBjRfAV1splzAcm6+e+uhrMZqSzcrYSC8qE36 cxjd6oiMD78P8ivqK7PY5HJn/efhQp6SPxxqRhbxKG6WwK/rB1ljv+op0Ewc3bklaJKK x4W7844xpY2tfxuHpu13c+O5K6myAn4u0Sk1CImYJkWfk8sGOZsnsCpIWDURkfsISPaP TMqRqOv0UXkJ10rITlMqiqpxE6QIOA1ZOyzPJ8dnjTGrUyEOsk6qZkMWnaUC1qf5eMdY PWCbh4zZWWPM7MtcMDBTAyy0GPUNYuUCWgWj0PUBT5gGuKpL0JlvO7GcLUAz3zqKn66J oHOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="N/5+rE05"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 34-20020a631062000000b0039d9be98fdfsi2925939pgq.819.2022.04.15.18.41.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 18:41:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="N/5+rE05"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 33EDA1EED0; Fri, 15 Apr 2022 18:06:06 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236653AbiDMPsf (ORCPT + 99 others); Wed, 13 Apr 2022 11:48:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231373AbiDMPsd (ORCPT ); Wed, 13 Apr 2022 11:48:33 -0400 Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD43A5EBF7; Wed, 13 Apr 2022 08:46:11 -0700 (PDT) Received: by mail-qk1-x733.google.com with SMTP id b189so1712992qkf.11; Wed, 13 Apr 2022 08:46:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=1YdLQXxMOH03x0SbnGmKpWrPU6dm2R7TxKypWUEVbgQ=; b=N/5+rE05+wJmxX89f5a2Dz/r6Gp205oy9BOnTqiTZF7l9Y5vVpWcvsfpxfraZ/Y7Xt 3MROOCvvSLcekz4PRkWNLWGxUl4YCX8xD3sKvNMse3NTnPFyPa/gEaMbEUVAiSwXupJc dqttYsb+nzr4FRMNrBwXwd3hz4Br4LuKqgbR+L/yAg1bIvPn8FErdyW9aU/vMdds9ZX1 Ij5xEPKixKBlkp8BqT2K641J2keHtI8bfjq9iULbWq3FzNv6MqsYN7ehORgGUzhEuFAv 8gf8uLCNXroOVEE2gl9eMggstv2bmY0Z9By7PIrFSZChD8kiEKJ4E16YYaDYutzVVvfQ hJGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=1YdLQXxMOH03x0SbnGmKpWrPU6dm2R7TxKypWUEVbgQ=; b=48gcV861XK88SwmO+K1mFWbboHKzkCb8/6PPkNmn72QKvxcMc0s1cEURq2RoqeLrW6 Oe3jPA460k/2r4XRmiiC++pU5pd1Ni45NKuGPpt5WH3IwshXOZF5sZWgwAjJypSNWW/s u2aetzrJ4nBD+2fshsPCDArJxYcf3OiZMzGkQhjq0QpT6jVIQFptoBky/aCnklP2c3au JycjoXp3QaWdquFMJgnrkDLVqIFnrIJuMsmddHR28mt6R42II5elfdQD5Nlpn73gR4U0 kC/Hz/6BuQzXwcWg9h/TV7vfFaZFwcbjeIMGTE+EpmeTfPvkudlz0ogzIhB4RxS3r3Ll POPw== X-Gm-Message-State: AOAM532MiqPAIOu2L7Ms4WnuFOIU7xWpwDe3VdK1hLJE0nGp2e5cfKiP /J6naVmthXi6MOk7YnwoG+d5tI5kQxA= X-Received: by 2002:a37:389:0:b0:69b:f56e:1672 with SMTP id 131-20020a370389000000b0069bf56e1672mr7463010qkd.614.1649864770825; Wed, 13 Apr 2022 08:46:10 -0700 (PDT) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com. [66.111.4.228]) by smtp.gmail.com with ESMTPSA id 2-20020a05620a070200b0069c231ab4a9sm5351832qkc.16.2022.04.13.08.46.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Apr 2022 08:46:09 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id 9B8BD27C005A; Wed, 13 Apr 2022 11:46:08 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 13 Apr 2022 11:46:08 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeluddgieeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeeuohhquhhn ucfhvghnghcuoegsohhquhhnrdhfvghnghesghhmrghilhdrtghomheqnecuggftrfgrth htvghrnhepheefudejueffjeelkedtgeelleelgfffhffhvdehtdekveehjeeivdejgedu udegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepsg hoqhhunhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqieelvdeghedtieeg qddujeejkeehheehvddqsghoqhhunhdrfhgvnhhgpeepghhmrghilhdrtghomhesfhhigi hmvgdrnhgrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Apr 2022 11:46:04 -0400 (EDT) Date: Wed, 13 Apr 2022 23:46:00 +0800 From: Boqun Feng To: guoren@kernel.org Cc: arnd@arndb.de, palmer@dabbelt.com, mark.rutland@arm.com, will@kernel.org, peterz@infradead.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Guo Ren , Andrea Parri Subject: Re: [PATCH V2 0/3] riscv: atomic: Optimize AMO instructions usage Message-ID: References: <20220412034957.1481088-1-guoren@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3IglbufFOlP6AShH" Content-Disposition: inline In-Reply-To: <20220412034957.1481088-1-guoren@kernel.org> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --3IglbufFOlP6AShH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [Cc Andrea] On Tue, Apr 12, 2022 at 11:49:54AM +0800, guoren@kernel.org wrote: > From: Guo Ren >=20 > These patch series contain one cleanup and some optimizations for > atomic operations. >=20 Seems to me that you are basically reverting 5ce6c1f3535f ("riscv/atomic: Strengthen implementations with fences"). That commit fixed an memory ordering issue, could you explain why the issue no longer needs a fix? Regards, Boqun > Changes in V2: > - Fixup LR/SC memory barrier semantic problems which pointed by > Rutland > - Combine patches into one patchset series > - Separate AMO optimization & LRSC optimization for convenience > patch review >=20 > Guo Ren (3): > riscv: atomic: Cleanup unnecessary definition > riscv: atomic: Optimize acquire and release for AMO operations > riscv: atomic: Optimize memory barrier semantics of LRSC-pairs >=20 > arch/riscv/include/asm/atomic.h | 70 ++++++++++++++++++++++++++++++-- > arch/riscv/include/asm/cmpxchg.h | 42 +++++-------------- > 2 files changed, 76 insertions(+), 36 deletions(-) >=20 > --=20 > 2.25.1 >=20 --3IglbufFOlP6AShH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEj5IosQTPz8XU1wRHSXnow7UH+rgFAmJW8DMACgkQSXnow7UH +rj7oQf+M4BWYub6wHMeoa6yx+iNDGo5x5qEHT1XmIZjZUrpk3Nl3YNVCrZq9oaf 6IwoRm1XKJhmlrkqUcrp0P8Bm/mq6PZ1mOTdSRtW3cp6mmjl+y6zhidet3KOJJFp gZz8CquT+PbQaNsnUMwWoosE85hL8FG/XYTQhoiCFVKF7PeqyFix2doCw66nRzvY Wdj458el5Yf+XrEIzEBsrBHCeSdBRiqjulU+SHBbtivfhoaIvpjKdvBOBxF9CC7+ DI0HuLWz38I6coBeHOmo64WoC8amPCi8xVUZvUgFdUGMSRT25elqoS0qSbq9Afm2 npRG/rZbHDLvSC1t4rCiN+HS1lVQYw== =lcp2 -----END PGP SIGNATURE----- --3IglbufFOlP6AShH--