From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 3 Jan 2018 13:06:16 -0800 From: Matthew Wilcox To: Christopher Lameter Cc: Dave Chinner , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig , Mel Gorman , Pekka Enberg Subject: Re: [RFC] Heuristic for inode/dentry fragmentation prevention Message-ID: <20180103210616.GB3228@bombadil.infradead.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: On Wed, Jan 03, 2018 at 01:39:27PM -0600, Christopher Lameter wrote: > +++ linux/fs/dcache.c > @@ -1074,7 +1074,8 @@ static enum lru_status dentry_lru_isolat > return LRU_REMOVED; > } > > - if (dentry->d_flags & DCACHE_REFERENCED) { > + if (dentry->d_flags & DCACHE_REFERENCED && > + kobjects_left_in_slab_page(dentry) > 1) { > dentry->d_flags &= ~DCACHE_REFERENCED; > spin_unlock(&dentry->d_lock); > Maybe also update this comment: /* * Referenced dentries are still in use. If they have active * counts, just remove them from the LRU. Otherwise give them - * another pass through the LRU. + * another pass through the LRU unless they are the only + * object on their slab page. */ -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org