Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp824767ybf; Thu, 27 Feb 2020 00:07:26 -0800 (PST) X-Google-Smtp-Source: APXvYqzPgHWjxV3dknflaEqTTcM93lMD7pI7jgozcmFV1TNcGmM6oMA5P2VpZ5Ws41lMtUIHoP8c X-Received: by 2002:a9d:63c6:: with SMTP id e6mr2169630otl.365.1582790846117; Thu, 27 Feb 2020 00:07:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582790846; cv=none; d=google.com; s=arc-20160816; b=UH+d6TiZjPFmn5XQyBSgeEyU7g082Q4FOFRBfvDInJNzux3Gg1v3yjFIiswnbNS0WS LZBc9/gRYZq4jzblFrjjz3uxYiG720ZmLEul0tVs7JcjPFB9qVUKWpgItI+5oB/uA3BD EUQK53aX9WZb6MTYGHBt0Uu9Y2J2YDvn5l4cNN/N4tzEEzia+8I2vU+so8XNiiwDW4r8 zAi0mBG307Nc9IFbgNMAstMTynBLpgqNxAbRWhFSLbS3B3yqzwWcwRQP7gjyX5EMMRbr zPzgLoLYb859RHK4GA3gBfHM4kL25HHV+XAjRNQedpfUuCP7PfoYYEc1UJQiUbSkGrhI UIuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Sy0FvB+0jLlZu7C7bTFnu1PwFgqDLCmDrYraRx/ZZUk=; b=c3aZBW1z8LjTkqyS4BGoFDQVAoe2zchg3BDwXW4paTuxKN2oP1UXMSPBdAjOVLLqwS D0yw47XuC+oEgpdgz4ZxOI/Hw+gsBlS71HrfNCfqXFZFFJKhUfPKGEW54typqFv9Ixl3 UgUTj6+f6b9Oolb2EM+WU6UtWZT2U3n9EuusZwlVWsfb8xAUUjSmCc1skQU+fBWEEkTy 0oeLBm64Yd5lCWvdfnZewlcCgKGfvWMw6Balgr8t2YGhtAC1p321hUI3mr+HSByXXfzR 15YRAp3PVEcgnNU/uwejJtIDfTh9hf7PmTBggF00TxpCKNIoJPVEMvDyCxFxNmw4pB+m Eh6w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a20si1097800otf.271.2020.02.27.00.07.13; Thu, 27 Feb 2020 00:07:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728466AbgB0IHK (ORCPT + 99 others); Thu, 27 Feb 2020 03:07:10 -0500 Received: from mail105.syd.optusnet.com.au ([211.29.132.249]:37965 "EHLO mail105.syd.optusnet.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726999AbgB0IHK (ORCPT ); Thu, 27 Feb 2020 03:07:10 -0500 Received: from dread.disaster.area (pa49-195-202-68.pa.nsw.optusnet.com.au [49.195.202.68]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 4E1BE3A340D; Thu, 27 Feb 2020 19:07:04 +1100 (AEDT) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1j7ECF-0007tA-Ly; Thu, 27 Feb 2020 19:07:03 +1100 Date: Thu, 27 Feb 2020 19:07:03 +1100 From: Dave Chinner To: Matthew Wilcox Cc: Andreas Dilger , Waiman Long , Alexander Viro , Jonathan Corbet , Luis Chamberlain , Kees Cook , Iurii Zaikin , Linux Kernel Mailing List , Linux FS Devel , linux-doc@vger.kernel.org, Mauro Carvalho Chehab , Eric Biggers , Eric Sandeen Subject: Re: [PATCH 00/11] fs/dcache: Limit # of negative dentries Message-ID: <20200227080703.GK10737@dread.disaster.area> References: <20200226161404.14136-1-longman@redhat.com> <20200226162954.GC24185@bombadil.infradead.org> <2EDB6FFC-C649-4C80-999B-945678F5CE87@dilger.ca> <20200226214507.GE24185@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200226214507.GE24185@bombadil.infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.3 cv=LYdCFQXi c=1 sm=1 tr=0 a=mqTaRPt+QsUAtUurwE173Q==:117 a=mqTaRPt+QsUAtUurwE173Q==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=l697ptgUJYAA:10 a=7-415B0cAAAA:8 a=tZu0WVHQ-7pqTbS7xfgA:9 a=CjuIK1q_8ugA:10 a=biEYGPWJfzWAr4FL6Ov7:22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 26, 2020 at 01:45:07PM -0800, Matthew Wilcox wrote: > had twice as many entries in it, would that significantly reduce the > thrash of new entries being created". In the page cache, we end up > with a double LRU where once-used entries fall off the list quickly > but twice-or-more used entries get to stay around for a bit longer. > Maybe we could do something like that; keep a victim cache for recently > evicted dentries, and if we get a large hit rate in the victim cache, > expand the size of the primary cache. You know, I've been saying exactly the same thing about the inode LRU in response to people trying to hack behaviour out of the shrinker that is triggered by the working set getting trashed by excessive creation of single use inodes (i.e. large scale directory traversal). IOWs, both have the same problem with working set retention in the face of excessive growth pressure. So, you know, perhaps two caches with the same problem, that use the same LRU implementation, could solve the same problem by enhancing the generic LRU code they use to an active/inactive style clocking LRU like the page LRUs? Cheers, Dave. -- Dave Chinner david@fromorbit.com