Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp547711pxu; Fri, 11 Dec 2020 08:25:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJwFyuCEc75GFR2cttL81oaxuEUYY5GQ7vKDrwah1wkNTLOwb0rpWg2syZzNGWXBbeE000Tz X-Received: by 2002:a50:8163:: with SMTP id 90mr12403592edc.142.1607703908390; Fri, 11 Dec 2020 08:25:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607703908; cv=none; d=google.com; s=arc-20160816; b=z+Hb96VvCkbSAf04E9Gwr8Ht2ZiLVNBfn7wQ8AcU4EPc9stK4HsJqLB+VOPF6Ofdpx V3hCyA9CjDgt821+qThYGYJKaNmFtK1Qm+zf6gjHDqE92bmQnnMY721J4A6KI7+oRMoQ BYPQooI4TfC35hxsOM+4jZYQQT+SUTfwv3W/x9582rhmKxP15BkE1GL7g0vkF/lvTzfw AMxPKMcL580U402V+F40JoVGflAelKLLFQY6898mdjEMaWrgtKuwhdoPZEr9nTvm76vW lJb4V7Mwaq873xaVq04lLUJImypnttOwZdwMtgL3PGKdXsrQZRbQUp604JPB/7mlNk5C I37Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature:dkim-signature; bh=Mk4NqxzLuWLKy5drr/+acuyc6PH3oJ4a/giS9TGTLlg=; b=UmyY5e8Gwj0eQPFhylQ8fuUcTMq0zEGhRVARyjQhE4ohCRbExZaYzx2+X7l5E7Erzm q/y6s5E0kHFu9C/gnx7oK7dEgCcfll4RNlTSVQ5FU9iZYJv0Fa4qF9E6C4czAqGEKtLJ idRiLaUHkAGOYk/+m1XBiNHojINxcb387DAytyeOj+2BFZn8PlNUssQri7EY0dtRnJ7o wmctFVGZOIQ2HV1+UXRg+olsZSpJdiVjyXafD9R8a1PxdHuo+qo+Anpgg3eb1BlnZSXh Nh2CfGBzp9y0twMOzGgY8aCS60h9zHh3T57UPcOWqKdtuahs3LZJMF73xgODyYYaEHWU eFsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@themaw.net header.s=fm1 header.b=M5FBjrSR; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=AX+wtifY; 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 y4si5145835edp.451.2020.12.11.08.24.30; Fri, 11 Dec 2020 08:25:08 -0800 (PST) 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=@themaw.net header.s=fm1 header.b=M5FBjrSR; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=AX+wtifY; 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 S2389903AbgLKCTL (ORCPT + 99 others); Thu, 10 Dec 2020 21:19:11 -0500 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:34965 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387840AbgLKCSm (ORCPT ); Thu, 10 Dec 2020 21:18:42 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 689BD580349; Thu, 10 Dec 2020 21:17:56 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 10 Dec 2020 21:17:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=themaw.net; h= message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version:content-transfer-encoding; s=fm1; bh= Mk4NqxzLuWLKy5drr/+acuyc6PH3oJ4a/giS9TGTLlg=; b=M5FBjrSRRvmOLfT6 dmHwZYTypaadfcXCjc2RBLcosIjUmOIer3i/yjHLB6kXGgEd/CCHqkuEu+zH/HsT nJY9oxQxNJLRCTJeYZzB20I3OERPUtssPkCelFs7gAmlx/4PmFYr5BW7FOLKJs2z VAEvh9qI9+DoqKr6BKs7PNcmH4o4mB/v3UW6Xk5iociSvYNK4++rDL4gubz7j32k SRSt06kN5EsjiiDmuocwKdE9+1TgvK+o5oP/Fx0axzkv+3zYhm5HOzm2dvd9b/0B P0bndG/092b472IlQJ4ye58Xmqg1H1tjPA2vi+y7J1ck5DQIBKFktaxnStgxw/k7 HeArNQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=Mk4NqxzLuWLKy5drr/+acuyc6PH3oJ4a/giS9TGTL lg=; b=AX+wtifYco/jV/K4xtfKRuQ+C9ODj1FTsNLhTufAWs86NqDx4obGBVdd7 Rhz5B2shyxI7imQJBPqLOv+vBriX5gI8CnmQXmmCNjxSZ/vK9evaKOEaZNr/R/w0 4R1nYEjjmreChqwd3+AiTiPP5pV3CFeK3kxet8cbjb6eiAK9VwM9x+wrBSHD4Qlk WwWH/GbKiroRBbONpmKdTeYZx+4tYrcn8IBqTDf35bxphZiE3g2G2FsJbkXBiPR6 LQc6b9Oo62XypPPKmtJnbYgbl1W3ruP9kwq2tYbiHGERrv81fkIjEZY1NFcW6MX+ DIwXSQ/avo8RY02Oe/J7lBYTX9vIQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudekuddggeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkffuhffvffgjfhgtfggggfesthejredttderjeenucfhrhhomhepkfgrnhcu mfgvnhhtuceorhgrvhgvnhesthhhvghmrgifrdhnvghtqeenucggtffrrghtthgvrhhnpe eikeeggeeuvdevgfefiefhudekkeegheeileejveethedutedvveehudffjeevudenucff ohhmrghinhepkhgvrhhnvghlrdhorhhgnecukfhppedutdeirdeiledrvdefkedrudekfe enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehrrghv vghnsehthhgvmhgrfidrnhgvth X-ME-Proxy: Received: from mickey.themaw.net (106-69-238-183.dyn.iinet.net.au [106.69.238.183]) by mail.messagingengine.com (Postfix) with ESMTPA id 79A031080059; Thu, 10 Dec 2020 21:17:51 -0500 (EST) Message-ID: <13e21e4c9a5841243c8d130cf9324f6cfc4dc2e1.camel@themaw.net> Subject: Re: [PATCH v2 0/6] kernfs: proposed locking and concurrency improvement From: Ian Kent To: Fox Chen Cc: akpm@linux-foundation.org, dhowells@redhat.com, gregkh@linuxfoundation.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, miklos@szeredi.hu, ricklind@linux.vnet.ibm.com, sfr@canb.auug.org.au, tj@kernel.org, viro@ZenIV.linux.org.uk Date: Fri, 11 Dec 2020 10:17:47 +0800 In-Reply-To: <822f02508d495ee7398450774eb13e5116ec82ac.camel@themaw.net> References: <159237905950.89469.6559073274338175600.stgit@mickey.themaw.net> <20201210164423.9084-1-foxhlchen@gmail.com> <822f02508d495ee7398450774eb13e5116ec82ac.camel@themaw.net> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2020-12-11 at 10:01 +0800, Ian Kent wrote: > > > For the patches, there is a mutex_lock in kn->attr_mutex, as Tejun > > mentioned here > > (https://lore.kernel.org/lkml/X8fe0cmu+aq1gi7O@mtj.duckdns.org/), > > maybe a global > > rwsem for kn->iattr will be better?? > > I wasn't sure about that, IIRC a spin lock could be used around the > initial check and checked again at the end which would probably have > been much faster but much less conservative and a bit more ugly so > I just went the conservative path since there was so much change > already. Sorry, I hadn't looked at Tejun's reply yet and TBH didn't remember it. Based on what Tejun said it sounds like that needs work. Ian