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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id F15CEC433EF for ; Tue, 15 Mar 2022 19:56:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 610C68D0003; Tue, 15 Mar 2022 15:56:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5BF818D0001; Tue, 15 Mar 2022 15:56:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4AF1E8D0003; Tue, 15 Mar 2022 15:56:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0049.hostedemail.com [216.40.44.49]) by kanga.kvack.org (Postfix) with ESMTP id 3EB4D8D0001 for ; Tue, 15 Mar 2022 15:56:13 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id EB2731808E183 for ; Tue, 15 Mar 2022 19:56:12 +0000 (UTC) X-FDA: 79247676984.27.260559A Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf16.hostedemail.com (Postfix) with ESMTP id 07F2A180015 for ; Tue, 15 Mar 2022 19:56:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:In-Reply-To:References; bh=c0sTAmq3W1jrsXGgq1g3SYAlZlT3nYN+7v5mMEKTke0=; b=mhSzvLJOzZt635pLCLpf1P4qhh iypHn5061CTisjIQNMtnYUbLCSfT3Mj5F6qT9pqJ/a2krJEcLxna0srEgtuJ1Ctiy1OoifmGJ+Tk4 cEZ2qwijboouvM+7xvb3iCt5Re9dOwxuR96FhoKMUzPf9prv3+n4cJJCvYymxNyJAhYgK4/LrF7tU e5iP0ZwuWpgJwlnzJp+y+ffcqgpzyEaqDAeCG45JCuyV+CIattoSRiq/tn8OBiMD+8M8o1dOauUMN RpHsusoOxz2jWdzv68+Ba9s7VA0e2EAXFfFL0ucUcpAQ/RfZi0ABD2avkdlvAn23VWeSSrJcF4WGm m67CsTnw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUDGn-005KqP-0A; Tue, 15 Mar 2022 19:55:49 +0000 Date: Tue, 15 Mar 2022 19:55:48 +0000 From: Matthew Wilcox To: Stephen Brennan , lsf-pc@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Cc: Gautham Ananthakrishna , khlebnikov@yandex-team.ru Subject: [LSF/MM TOPIC] Better handling of negative dentries Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspam-User: Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=mhSzvLJO; dmarc=none; spf=none (imf16.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 07F2A180015 X-Stat-Signature: mowqcbbo5xngmssy8tfrjpoxd75pqjkr X-HE-Tag: 1647374171-57556 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The number of negative dentries is effectively constrained only by memory size. Systems which do not experience significant memory pressure for an extended period can build up millions of negative dentries which clog the dcache. That can have different symptoms, such as inotify taking a long time [1], high memory usage [2] and even just poor lookup performance [3]. We've also seen problems with cgroups being pinned by negative dentries, though I think we now reparent those dentries to their parent cgroup instead. We don't have a really good solution yet, and maybe some focused brainstorming on the problem would lead to something that actually works. (Apologies to Stephen; I should have thought to send this before the invitations to LSFMM went out). [1] https://lore.kernel.org/linux-fsdevel/20220209231406.187668-1-stephen.s.brennan@oracle.com/ [2] https://lore.kernel.org/linux-fsdevel/1611235185-1685-1-git-send-email-gautham.ananthakrishna@oracle.com/ [3] https://lore.kernel.org/linux-fsdevel/158893941613.200862.4094521350329937435.stgit@buzz/