Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp284370pxj; Wed, 16 Jun 2021 02:14:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGqjreNf0yRzbheoyvV/KjMH5EfvhHhO0Dy3Rl5/X1k9yCr1viHCbeDi0HgUqMmep92cIG X-Received: by 2002:a17:906:1814:: with SMTP id v20mr4189444eje.152.1623834869667; Wed, 16 Jun 2021 02:14:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623834869; cv=none; d=google.com; s=arc-20160816; b=NPQDHALWoKaeCWuwDxPOV3p+Jp58fbjyOtff+5LspyuqsDt57scgqAbDgg6bGlXppF QQAZdQ9d7VCOw9WgBV2uAYUzxWhMGNQcAU+goq0JhooP9U1I6D0ca+CjOxPS0jaNLxYI yYFW0uzn43oJkcx8bNiZ4qlwclXwyK5+1DIkltCJH+lnxtxGZ17qVLgQBMdgVUP4Gvro SwLhrpxtvsDxxx+50hVWmSJ7Q0y4226mnM8+S56LCA2DzUF0qtsfK/WQC+aVBU+xxoAy 0VKIuYt1OprnwGPcNNRWptMOmdUR+plAVTn0bg9UIH1mQJldJ9j9POiUw0TqkuBAqn2m VFLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=fg+Lwm8bqclQbxxF9nKW4sgpvY121G0MYdrkC/2k1M8=; b=l6MiI3TguSFj5McijewoyeMJgC5NftXnfUaZ+CrMXSePBQKiQjWBxn/KBjfnAgPoyu 81DSjbn0Uzs6Pgj9aVPgL53ArBaieKAT+0b3x1qlh7+7h8VZbvxzzxoh7qCeelwfGPyN 5AlrG7B39HlhMqVHAs7/1U2mlnkBoyXwJDjJlxTKOwtsrK0LbBfDxDIhMKcbp3j5Y87D GaZM+RJdKwG09UOuUySVaNsYwhO/hMcR8FLRQp5lrkO9MbcBWvz+oqDSBpLDMWRqotZx lktChFqfaLs7njIbniJgwBZC++h9LOD1pkIXjjwyrJrkpxBCeOmLsbJnBovk5U785NfE Ggkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=eLGiC8kk; 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 lu6si1850822ejb.547.2021.06.16.02.14.07; Wed, 16 Jun 2021 02:14:29 -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; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=eLGiC8kk; 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 S232093AbhFPJOy (ORCPT + 99 others); Wed, 16 Jun 2021 05:14:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231389AbhFPJOx (ORCPT ); Wed, 16 Jun 2021 05:14:53 -0400 Received: from mail-ua1-x92d.google.com (mail-ua1-x92d.google.com [IPv6:2607:f8b0:4864:20::92d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B0CFC061574 for ; Wed, 16 Jun 2021 02:12:48 -0700 (PDT) Received: by mail-ua1-x92d.google.com with SMTP id x22so543318uap.0 for ; Wed, 16 Jun 2021 02:12:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fg+Lwm8bqclQbxxF9nKW4sgpvY121G0MYdrkC/2k1M8=; b=eLGiC8kkhgquOH+uwR66kHv1IPOXh5NS6AtUvw8ENiPjX3MbCqGOFI3kx2g+dx6Tnc o1gP20fNEjAVj2TSPTcBjM2RhiYrf1lr/9RdX6k41CyvK+0LvDzAuF1pNfR8SPDFVnIU UdbGzPAZBwGtCf4UeXvuvKO6AWBy035AlYzcg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fg+Lwm8bqclQbxxF9nKW4sgpvY121G0MYdrkC/2k1M8=; b=mWG6wXnfqZ5oL1rWeEXEkBVIx2KMpiaQiGZsXCQMVw/MGM36L9DutJP7U57nSkhhg5 h6dKEEyjjeOlaDEfGGCiPq/6xpmTWNxlQLBdEHC1J1onV9wIV6nJvqwGWVvhs34etOzA pV5kpcEXJ9/drIA8xMDB7tvU+fYxjPk92ed281Hb5KND27VaSk38WmBFnb4F5ZYH2b1q hdKGYryTEmFBRsTbZnpl8iYapi7WgVajGu8bHpfFgui6EmLFetPq5EK95RFmbQbwZ0Gf i8Ton92FVGkCppItRFDuz+bD7FBnvvXvX8TgsjixR1FGV1hrpf03icxFSMJsV2iSHLI/ QQpQ== X-Gm-Message-State: AOAM532GCATtAxCk5AUbms5fq4nfvmr/1OYsS0KeQqp1WEtW0hjRzEaE nRV7dIngproNT02lybzlJ7t9i88zcMszGREmFx7f9g== X-Received: by 2002:ab0:6448:: with SMTP id j8mr3590542uap.13.1623834767170; Wed, 16 Jun 2021 02:12:47 -0700 (PDT) MIME-Version: 1.0 References: <162375263398.232295.14755578426619198534.stgit@web.messagingengine.com> <162375278118.232295.14989882873957232796.stgit@web.messagingengine.com> In-Reply-To: <162375278118.232295.14989882873957232796.stgit@web.messagingengine.com> From: Miklos Szeredi Date: Wed, 16 Jun 2021 11:12:36 +0200 Message-ID: Subject: Re: [PATCH v7 3/6] kernfs: use VFS negative dentry caching To: Ian Kent Cc: Greg Kroah-Hartman , Tejun Heo , Eric Sandeen , Fox Chen , Brice Goglin , Al Viro , Rick Lindsley , David Howells , Marcelo Tosatti , "Eric W. Biederman" , Carlos Maiolino , linux-fsdevel , Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 15 Jun 2021 at 12:26, Ian Kent wrote: > > If there are many lookups for non-existent paths these negative lookups > can lead to a lot of overhead during path walks. > > The VFS allows dentries to be created as negative and hashed, and caches > them so they can be used to reduce the fairly high overhead alloc/free > cycle that occurs during these lookups. > > Use the kernfs node parent revision to identify if a change has been > made to the containing directory so that the negative dentry can be > discarded and the lookup redone. > > Signed-off-by: Ian Kent Reviewed-by: Miklos Szeredi