From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98F0FC432BE for ; Tue, 27 Jul 2021 10:44:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8181F61052 for ; Tue, 27 Jul 2021 10:44:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236380AbhG0Kog (ORCPT ); Tue, 27 Jul 2021 06:44:36 -0400 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:34109 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236186AbhG0Koa (ORCPT ); Tue, 27 Jul 2021 06:44:30 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 155F3580ACA; Tue, 27 Jul 2021 06:44:30 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 27 Jul 2021 06:44:30 -0400 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=fm3; bh= hzwP7HziDq3+lShGm+nfs91KpNl05pJCwIUruh9Ju94=; b=pWgsuCA7q3GmjXTE FDvgePMxG6kyzXKuN+2QNxiqRQwcA+9aEK+ZNYltcBaKS76VT46ARnMl9VHAO9Ll F5Ynu687blGcolvBxiCfWeZ2WhIgcYXEhyL841wPrxg+jlo29GkD//srH4HoxM9U 8MIEuySboa5mCMksbFCEa/U+g98Fp4xbY7pPpSpl4qK7YO/8+Ffjb9oExIiGdCzg 48KKFZifSvzrrwzEeZRfEqLH4Tq4BPJoqHpVHaAfLuKPnvZX7qRBLpZBKrmUizrS Up8bAmRqybLfIkQAW+mdDe9O/Z2zbg234M30kBKZyuFy+gGYPEssZyeJZQEYfuaJ RprK6A== 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=fm3; bh=hzwP7HziDq3+lShGm+nfs91KpNl05pJCwIUruh9Ju 94=; b=KKl3fOo2us0gNYxEpts5gM3+aXz8Y7LShysbJuNQIoTuTKgC05Yu+8nFK PrptjfyxleFjpR2o/4HJFTEUndQpWVIgBS/4fdIzhTYOH3AOUZNrzIq8VMER1pKN koVXShuqjcPwieOnkKE2vhv5+MfgXVP2V4VGTgOU3uNFTbugsISeTzadbpFCroYo BsbT+QMcY38hLoB8xtjbKSGJmxeCQusA73tYWV7DVrQm/G58r+l20Lv1PeERgUGy gjdet35hew3YR9FgpKs/vKk7CWN8MZN84RJ/R0iFMdW9R53xidGk3R4Q5K/gThne aOYNlT2kQzDNnaAITKbxj2OIleKWw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrgeejgddviecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkuffhvfffjghftggfggfgsehtjeertddtreejnecuhfhrohhmpefkrghnucfm vghnthcuoehrrghvvghnsehthhgvmhgrfidrnhgvtheqnecuggftrfgrthhtvghrnhepfe efteetvdeguddvveefveeftedtffduudehueeihfeuvefgveehffeludeggfejnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprhgrvhgvnhesth hhvghmrgifrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 27 Jul 2021 06:44:22 -0400 (EDT) Message-ID: <2d4b407cad4270952a85951455cb722a4c435c69.camel@themaw.net> Subject: Re: [PATCH v8 0/5] kernfs: proposed locking and concurrency improvement From: Ian Kent To: Greg Kroah-Hartman Cc: Tejun Heo , Eric Sandeen , Fox Chen , Brice Goglin , Al Viro , Rick Lindsley , David Howells , Miklos Szeredi , Marcelo Tosatti , "Eric W. Biederman" , Carlos Maiolino , linux-fsdevel , Kernel Mailing List Date: Tue, 27 Jul 2021 18:44:18 +0800 In-Reply-To: References: <162642752894.63632.5596341704463755308.stgit@web.messagingengine.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2021-07-27 at 12:02 +0200, Greg Kroah-Hartman wrote: > On Fri, Jul 16, 2021 at 05:28:13PM +0800, Ian Kent wrote: > > There have been a few instances of contention on the kernfs_mutex > > during > > path walks, a case on very large IBM systems seen by myself, a > > report by > > Brice Goglin and followed up by Fox Chen, and I've since seen a > > couple > > of other reports by CoreOS users. > > > > The common thread is a large number of kernfs path walks leading to > > slowness of path walks due to kernfs_mutex contention. > > > > The problem being that changes to the VFS over some time have > > increased > > it's concurrency capabilities to an extent that kernfs's use of a > > mutex > > is no longer appropriate. There's also an issue of walks for non- > > existent > > paths causing contention if there are quite a few of them which is > > a less > > common problem. > > > > This patch series is relatively straight forward. > > > > All it does is add the ability to take advantage of VFS negative > > dentry > > caching to avoid needless dentry alloc/free cycles for lookups of > > paths > > that don't exit and change the kernfs_mutex to a read/write > > semaphore. > > > > The patch that tried to stay in VFS rcu-walk mode during path walks > > has > > been dropped for two reasons. First, it doesn't actually give very > > much > > improvement and, second, if there's a place where mistakes could go > > unnoticed it would be in that path. This makes the patch series > > simpler > > to review and reduces the likelihood of problems going unnoticed > > and > > popping up later. > > > > Changes since v7: > > - remove extra tab in helper kernfs_dir_changed. > > - fix thinko adding an unnecessary kernfs_inc_rev() in > > kernfs_rename_ns(). > > Thanks for sticking with this, I've applied this to my testing branch > and let's see how 0-day does with it :) That's great news Greg, and thanks for putting up with me too, ;) Ian