Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp496007pxa; Thu, 27 Aug 2020 07:57:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkJrdVI+dOsH+GsfK6g3iOPo8BAJjbCQpk/I06+SrwQ5mkH4x6gPVLFwUNYs8nRVc1uGh0 X-Received: by 2002:a17:906:4c52:: with SMTP id d18mr8006429ejw.368.1598540243502; Thu, 27 Aug 2020 07:57:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598540243; cv=none; d=google.com; s=arc-20160816; b=WPCBMV7CeR+IDlfuYqe8WXXPCjPolEUdxMbAy8I7Huya/SPodKUL3Lh9ac8zVszsV3 xxoYucilmkommx6eDbYlETHTTPi22O4Uiw0KSN9GVoZdALmZRp0sefYKwDpZvcA07U0E 9Yf2PvpgjAtI0hkSJxLfL0kKPtVPiSnJIckg84h7F7Nt29kjuIh6f6UhfxQPVsxvg88T t/sSYy5NuWt4Nl7XHI2Sn4hQxUdsvHoqDzdEjNO0sAmJcnMVirgMIlzAO2nYz2ij2qy0 toTHOHO06PFNvVVh8uDHieUBFGUwmJBMFu0OnZgrxxbewAMvWFuaXe8aa1tVIkCI3srR Wedw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=CmgXj1XorAh+4NcGTDKNtMMmvSfLMClgofC8aa64Bkg=; b=fw2rLP5Z901hHdRyPe3nyKIqEP5rsxcVOA2M0twdH9UN0B8UscMd3KFLS6zu0a38QJ FaQV3Fwd8HuSkifGZhnRsk35KvrvfSZb58KlW4/ChD0zNAixJPrCMYEII/l2VcDvCdSi riSKGgia/fEskEn+NNWeq/j3WIRDmEOUB/L4Gba4A26MED/b69dYzRusj77/gAYGR9Hj nqEyiDNLBILpXXhJYGrMaGDXzA/Bv7huW4bcuFkCaHxMUFKD/Ab2Pa7l9Oy2qSU4DmnI hbYZEuY9aUvpjANDKx+Zpubsu3z5VvCLC3cLHSPa9MZ+uwq9t38EnwJU7lBQkpja08y8 HR5g== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id du2si1922231ejc.111.2020.08.27.07.56.59; Thu, 27 Aug 2020 07:57:23 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727008AbgH0O4Z convert rfc822-to-8bit (ORCPT + 99 others); Thu, 27 Aug 2020 10:56:25 -0400 Received: from eu-smtp-delivery-151.mimecast.com ([185.58.86.151]:38606 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726084AbgH0NHp (ORCPT ); Thu, 27 Aug 2020 09:07:45 -0400 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-193-ebJTYPNPMbe2YTXzj0WrTA-1; Thu, 27 Aug 2020 14:07:34 +0100 X-MC-Unique: ebJTYPNPMbe2YTXzj0WrTA-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) by AcuMS.aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Thu, 27 Aug 2020 14:07:33 +0100 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Thu, 27 Aug 2020 14:07:33 +0100 From: David Laight To: 'Matthew Wilcox' , Shaokun Zhang CC: "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Yuqi Jin , Will Deacon , Mark Rutland Subject: RE: [PATCH] fs: Optimized fget to improve performance Thread-Topic: [PATCH] fs: Optimized fget to improve performance Thread-Index: AQHWfHA0Q0HraGCxZUqID6ug/Nw0ZqlL69xQ Date: Thu, 27 Aug 2020 13:07:33 +0000 Message-ID: <6feef2f0b6ed4df99e66c8325c8e66ae@AcuMS.aculab.com> References: <1598523584-25601-1-git-send-email-zhangshaokun@hisilicon.com> <20200827123040.GE14765@casper.infradead.org> In-Reply-To: <20200827123040.GE14765@casper.infradead.org> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: aculab.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Matthew Wilcox > Sent: 27 August 2020 13:31 > On Thu, Aug 27, 2020 at 06:19:44PM +0800, Shaokun Zhang wrote: > > From: Yuqi Jin > > > > It is well known that the performance of atomic_add is better than that of > > atomic_cmpxchg. > > I don't think that's well-known at all. Especially since on (probably) every architecture except x86 atomic_add() is implemented using atomic_cmpxchg(). David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)