Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp525608lqp; Wed, 22 May 2024 11:12:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW90XhNPgSLPkzYjDJzEvUyUY/HYKOS9KZx5AhiZUUFwCXP6jhFqUtz8Al/ImjPE6oCjD4R5ESaJMEjQJLEN0aI/eETeKP2vHi85AJUpQ== X-Google-Smtp-Source: AGHT+IFJXOYefJTGELK0Ha78ADm9OT5kxdO0WI7db23PiUGqqlaCzW9IllCgm5bQqCv2tnPIiY56 X-Received: by 2002:a05:6a21:7890:b0:1ad:746:b15a with SMTP id adf61e73a8af0-1b1f8ac4626mr3027575637.47.1716401557736; Wed, 22 May 2024 11:12:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716401557; cv=pass; d=google.com; s=arc-20160816; b=OtuQUmvZM+kXKRIWFq4BbrbXw5lQ3YOtd1RMN8WyEdhsZd38L4y3/eOBuOTE61JCAI /uy78ywHsiWZjid40cyLYfseUPLXoyFiKqspLZDqotXHLZsU8pMOvV/RAekCmW23xCoL tUtIBWzDwWLIXAPsWqQ4GolxfG78YFMX10Lq50XMfh6DXzn+mufj9SE/qQK6ErBoOtjM a+1LadYRRpKNLK+k8hQ1c7+EYgZJyBVDaoVEwi7FUOFRcV9GVZ1qRhg1U4c2iM5GScTc y/l0z42v7/tkuxfGKzRtFJEwzMUt6hr8T0RVTBJ61cIMkvn/ZD9KqWqx5+ryIR90Tmay HX6A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=AugUKhaYwKDJ/9b03MK/LG9RwwxS/6pxd40CuSzPjmc=; fh=4tvdCDdNrJF/K2ZGEuSROXva1AhhqDjT5kGPi/6ee+I=; b=U2uH+zvxafcIrYw4p81o+JL6q8U/p7pxTvmRwhhKPNbz6KlE2Yry6PuU/mVMqXFUAp 0MDGG93bKBm1YTs8r/u3e4SR6i4ORiDrDf2pb448rCwmJE6o5HUzlGmzVlshErOH2FKA F19f5rNoh6txywbfgOev7dUnBhkQH6fSFkuW1Vccv2JFzcqKYTuvmCzMgkaM26Yt39dd WQ7XCe51MMrKeD68z1rDDsNo3e6GiGe4FlXktvW54/DjrbkhqAtDMdBIp0+qKpZgRjky IPxKzydoegumeYz6gQ8AIw1KcYTVUe1wPdg/D2QdYsxW71UIQ6R1ElEDk0NKlrM1CnTw mrcw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=CTTYHZwy; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-186600-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186600-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-63412f13ea9si3422658a12.778.2024.05.22.11.12.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 11:12:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-186600-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=CTTYHZwy; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-186600-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186600-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4C113281E42 for ; Wed, 22 May 2024 18:12:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BEBCE145B03; Wed, 22 May 2024 18:12:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="CTTYHZwy" Received: from mail-ej1-f67.google.com (mail-ej1-f67.google.com [209.85.218.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E2352A929 for ; Wed, 22 May 2024 18:12:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.67 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716401534; cv=none; b=WZWrxzKUBHt30ezLxF0aS2hstZG9ztrEYkCNMZP4d8qFMhrc/OCLQBPnozr9u03dTMuEbb6DJnUlPdrwLZYLm6SP492nBVVlgL3sduAYoUkx6uGYkdHwj86foGIN2TrzJZClK/zBW37m1UG0XLgk5EDBFo0jNr7KyYex2eWsQcw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716401534; c=relaxed/simple; bh=ayimWCKkgfYo+0x6XeVSOVgCcBa5dhPMekRUmdgIThw=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=M2ljRMwihS0GzwxI4lrZJsyEPmbRmbJIuFcvTxbfgXJRnvHPJwpwXfoXPDmQPGiE9Tf5XhzFlRhOkH/Z6F5e0R3PXVzktjdgOgQEZPzG8V7ISAQ1f5YgnZSDiVRaCB2PJdHQU69mwG6owglRWySAsu7RAYL4bQkxb5ygpA114XI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=CTTYHZwy; arc=none smtp.client-ip=209.85.218.67 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Received: by mail-ej1-f67.google.com with SMTP id a640c23a62f3a-a5a4bc9578cso1002545466b.2 for ; Wed, 22 May 2024 11:12:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1716401531; x=1717006331; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=AugUKhaYwKDJ/9b03MK/LG9RwwxS/6pxd40CuSzPjmc=; b=CTTYHZwyB48HpHQbi2AkbOVs6ISj89wm8JzMriYZLeavnB+1W3aO+PF7vIiO9lbwNO GU2M6WKaC0wLBPyeX2vLVXjhcNsf1blRIaDbEkdR9t7MFy0ooq4CY22+5nGjQsyNFrXy S3eGdV5EyLkrlGZd76+y7irgNaq2jA+Bwl/eY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716401531; x=1717006331; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AugUKhaYwKDJ/9b03MK/LG9RwwxS/6pxd40CuSzPjmc=; b=NwhrwCtxef5v+obt4mcXIZyDGAGM+B1mvucBReXlbbUmuZa6s4n+zUYlOgXfxy23xS FjxFl5pppzEtoZm9aYX9bWVF484Y9habxbzfDOyhknyKaRNpVVT7PdNxF04VZGi6aFpk v/zRiF6+MFOXkBHx6mTe1XNejvGv2kciO2ekDL54jKd/8p4doOeB2gYfbouCxdQyeCw6 iA9roW3BKvljliMx/OFPwlHabk1Ni+rNjwHoHqm3Ufni+c1uVx2csiGvsMUBpXAz+v4K dosK9+APw1/vQFbaj/5poOqS0WuB+gUb3LMTEMqoqI9d/ewc2lOHDFHSuIwjXKFvyBWF H7tw== X-Forwarded-Encrypted: i=1; AJvYcCULIei0n/uSkuJrCu6QeDljsrRNx/X19wBnKEoLRv1snebmNlaY7wezcfu150ta3IiaFSkblHD+/Wkp9nQlmq/a3EvVBTJ7VJst2htj X-Gm-Message-State: AOJu0YwD+dwtsUJvnAiqF7JhN8l0NTzY87Yjb4YEWkL6Ogfmkoly7d0k W1WsgWF4T5fUiWyBC+6hZrPGuxtKTJ7N3CRP8INDiifadjjr73p4yCWvVUvbBvkqbembgy8r1OD Lv/DCALqd X-Received: by 2002:a17:906:7ad2:b0:a5a:893a:a73a with SMTP id a640c23a62f3a-a62280b0165mr239268966b.10.1716401531193; Wed, 22 May 2024 11:12:11 -0700 (PDT) Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com. [209.85.218.41]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a1781cf70sm1806721166b.30.2024.05.22.11.12.10 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 May 2024 11:12:10 -0700 (PDT) Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-a59ab4f60a6so914312566b.0 for ; Wed, 22 May 2024 11:12:10 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCW4oQuaDCfzVwxo3mzmgmEGjpOYE/HjYBt3icNWPhC+2osi5KWKq/X/iW66YfJv0lc9usEqZ2B6MHd3ydtv7U2VtUfZ+/6jHxnpDYt+ X-Received: by 2002:a17:906:488:b0:a59:b1cf:fea0 with SMTP id a640c23a62f3a-a62280d5059mr234104266b.19.1716401530325; Wed, 22 May 2024 11:12:10 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240515091727.22034-1-laoar.shao@gmail.com> <202405221518.ecea2810-oliver.sang@intel.com> In-Reply-To: From: Linus Torvalds Date: Wed, 22 May 2024 11:11:54 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] vfs: Delete the associated dentry when deleting a file To: Matthew Wilcox Cc: kernel test robot , Yafang Shao , oe-lkp@lists.linux.dev, lkp@intel.com, Al Viro , Christian Brauner , Jan Kara , Waiman Long , Wangkai , Colin Walters , linux-fsdevel@vger.kernel.org, ying.huang@intel.com, feng.tang@intel.com, fengwei.yin@intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 22 May 2024 at 10:14, Matthew Wilcox wrote: > > On Wed, May 22, 2024 at 09:00:03AM -0700, Linus Torvalds wrote: > > Of course, if you do billions of lookups of different files that do > > not exist in the same directory, I suspect you just have yourself to > > blame, so the "lots of negative lookups" load doesn't sound > > particularly realistic. > > Oh no. We have real customers that this hits and it's not even stupid. Oh, negative dentries exist, and yes, they are a major feature on some loads. Exactly because of the kinds of situations you describe. In fact, that's the _point_. Things like PATH lookup require negative dentries for good performance, because otherwise all the missed cases would force a lookup all the way out to the filesystem. So having thousands of negative dentries is normal and expected. And it will grow for bigger machines and loads, of course. That said, I don't think we've had people on real loads complain about them being in the hundreds of millions like Yafang's case. > plan9 handles this so much better because it has that union-mount stuff > instead of search paths. So it creates one dentry that tells it which of > those directories it actually exists in. But we're stuck with unix-style > search paths, so life is pain. I suspect you are just not as aware of the downsides of the plan9 models. People tend to think plan9 was great. It had huge and fundamental design mistakes. Union mounts =C3=A0 la plan9 aren't hugely wonderful, and there's a reason overlayfs does things differently (not that that is hugely wonderful either). Linus