Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp536277lqp; Wed, 22 May 2024 11:32:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV+JFlnkNFdtQ0/MTfPjq8pdL61JpE0WvYi7ks4z8dTywMgWPtUKn1ED2W3D78RrKKQlcBRw26G7i8BzlOZFEv5B19ZLadmQngSfwofTQ== X-Google-Smtp-Source: AGHT+IGP5QcS3lyHe4CHmqalxdYFAyzeOhnj12soucPjZrNBJwSZ4aNBJH1g4/qmTPiao+MB9AZh X-Received: by 2002:a17:906:2895:b0:a5a:55a3:4106 with SMTP id a640c23a62f3a-a622806b6d4mr182699366b.3.1716402743108; Wed, 22 May 2024 11:32:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716402743; cv=pass; d=google.com; s=arc-20160816; b=PAlZEUjzPlfdJ4BSwvetEpxbZVG08iMHm/DBxHPJ+qz76lFHvjbWTJ/1ZOOoayRN/m kcjc9tqsitDh2sYMVlxUQ0n+k5tZZ8MsTjvctPK65jg5RT15uISAhOycXNnR+fI5tGzx s0vRjpcS/qkpGcn3prXOzo8d8fzXbXIIz+GV/h2SypsI9kC3nVhtTc1nIQlzQqtdNc3+ ZWem5ipeTCLw99FQOqOBpS6i4oaDQpWTKaU43yN8cn7oPFM9R+SLae/I8rkET4LhhpJG 5QFYldS7hviOCY9enEXQBBkUGF177BOiQUXncnSBX2/PUT9hs4N6sPyZPdNlGmY+uwM4 Ft6g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=tTs5GqkH792WkQ5uou1WjI1GQqIun7xt5FNmVzrUoKY=; fh=QitHxE+uPusHEns4MxKvc1aZnPkK2edpSOgmwWeCLsU=; b=oBpwDetTpNXosgqaCC7ZFathCtgW6H0ZBjS9h1O2mSAAf0G7fzU4O9+AAM5Jdnyod3 zFABqKECplBmw0zx9GV8CQFUcrKSzo04/9Yeu3epWaVKWeYF2CRZSKJKUmjs6nRApD58 YIRiXsVqYZCTa/mdoWRYZ1HVre6pJusIMJKbonyU9HgPH/AKQSfgtjUkDFN5Mp1Qf4nv tbIont27IHo4kp2RwpLQh9gjLwMJFqCzbJsulC4M3SaqnEoms6RIQftnBEdJ90HfLaTO +IYxs2+TPsPP8zl6XUOeWsuY9YODKiNJOL3FZ/uzGUtKMNyDpqx8D3ieFBSpBNFCr9bo VboA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=VBh336lN; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-186543-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186543-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17b37548si1550590866b.414.2024.05.22.11.32.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 11:32:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-186543-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=VBh336lN; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-186543-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186543-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 am.mirrors.kernel.org (Postfix) with ESMTPS id A52811F22B6D for ; Wed, 22 May 2024 17:14:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BDC841422C8; Wed, 22 May 2024 17:14:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="VBh336lN" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 563D1762FF; Wed, 22 May 2024 17:14:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716398046; cv=none; b=jtP/uYM0b6f/Le1yLNyWb4OT9x9ZRxxgl4pksG5SldqkxUeY1/AgqmcLbMu/TbuAtyiQbM6LbdHCmCPYXqJoW06Spp3Yl4Px0NEuASAIV6UDiYyii7UvTq+5J9rL5ksK7KYd4rBq/iE/WILgWt8DLOBBpezEWNWlUuzp26KMkTo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716398046; c=relaxed/simple; bh=mbmrUgoWc/irdBq3b+5a3FMGIAtSnhpi9AUa/pCz9n0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=oUOMtXyi48Gc0HnOn/QFZlor6CYGfN1UZ2xcqKezycv6hmQJnuHeAH+GbFvNfcE4CXZ4Yaa2TlIMDDoVpLKE5JFAzVg7zfPYcBlEWzRFkmyqOOV0Ae7UnoIRTIEfFiWLqJ1IZpcIO7RMLLf2VD8Am77TG8AE2WWfiLTwKiiWt+I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=VBh336lN; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=tTs5GqkH792WkQ5uou1WjI1GQqIun7xt5FNmVzrUoKY=; b=VBh336lNsDVUCmD5sKjJynTTOh g791d7gHmi1Fk0v2aqXU+C+DyODxr3tIORHuNoGSbhfb2slTVoVTl2uFIPrn37YqWi26hN0KsDqw5 2KhmSp9dzPE6HM0kh+R41fRhe5dpes8HAKZWjx6tw8sHax/GhqN7JpQ52k1wurVhMys2G3lgtaNAP SdQxtE6X4eDiXexmnCf0GIyqNKg4hDO5hJdvkRGrRYfTlf/EUctSuaRAb2URt58u+IE9aoCOh50Mv fkyNht8QFQCvA/o06TuCmu/IQoWdWf0GJCCuAZJoCUtsKKsXpe8raiRvAJevNdylYnxyZTPPRp2k+ Ui/x+jiQ==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1s9pXJ-00000000rO0-2wvS; Wed, 22 May 2024 17:13:57 +0000 Date: Wed, 22 May 2024 18:13:57 +0100 From: Matthew Wilcox To: Linus Torvalds 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 Subject: Re: [PATCH] vfs: Delete the associated dentry when deleting a file Message-ID: References: <20240515091727.22034-1-laoar.shao@gmail.com> <202405221518.ecea2810-oliver.sang@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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. Every time an "event" happens, they look up something like a hash in three different directories (like $PATH or multiple -I flags to the compiler). Order is important, so they can't just look it up in the directory that it's most likely to exist in. It usually fails to exist in directory A and B, so we create dentries that say it doesn't. And those dentries are literally never referenced again. Then directory C has the file they're looking for (or it doesn't and it gets created because the process has write access to C and not A or B). 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.