From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f199.google.com (mail-qk0-f199.google.com [209.85.220.199]) by kanga.kvack.org (Postfix) with ESMTP id 268C66B472E for ; Tue, 28 Aug 2018 13:19:59 -0400 (EDT) Received: by mail-qk0-f199.google.com with SMTP id q3-v6so1915395qki.4 for ; Tue, 28 Aug 2018 10:19:59 -0700 (PDT) Received: from mx1.redhat.com (mx3-rdu2.redhat.com. [66.187.233.73]) by mx.google.com with ESMTPS id m34-v6si1557554qkh.283.2018.08.28.10.19.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Aug 2018 10:19:58 -0700 (PDT) From: Waiman Long Subject: [PATCH 0/2] fs/dcache: Track # of negative dentries Date: Tue, 28 Aug 2018 13:19:38 -0400 Message-Id: <1535476780-5773-1-git-send-email-longman@redhat.com> Sender: owner-linux-mm@kvack.org List-ID: To: Alexander Viro , Jonathan Corbet Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-doc@vger.kernel.org, "Luis R. Rodriguez" , Kees Cook , Linus Torvalds , Jan Kara , "Paul E. McKenney" , Andrew Morton , Ingo Molnar , Miklos Szeredi , Matthew Wilcox , Larry Woodman , James Bottomley , "Wangkai (Kevin C)" , Michal Hocko , Waiman Long This patchset is a reduced scope version of the patchset "fs/dcache: Track & limit # of negative dentries" (https://lkml.org/lkml/2018/7/12/586). Only the first 2 patches are included to track the number of negative dentries in the system as well as making negative dentries more easily reclaimed than positive ones. There are controversies on limiting number of negative dentries as it may make negative dentries special in term of how memory resources are to be managed in the kernel. However, I don't believe I heard any concern about tracking the number of negative dentries in the system. So it is better to separate that out and get it done with. We can deal with the controversial part later on. Patch 1 adds tracking to the number of negative dentries in the LRU list. Patch 2 makes negative dentries to be added at the head end of the LRU list so that they are first to go when a shrinker is running if those negative dentries are never referenced again. Waiman Long (2): fs/dcache: Track & report number of negative dentries fs/dcache: Make negative dentries easier to be reclaimed Documentation/sysctl/fs.txt | 19 ++++++++++----- fs/dcache.c | 56 ++++++++++++++++++++++++++++++++++++++++++++- include/linux/dcache.h | 8 ++++--- include/linux/list_lru.h | 17 ++++++++++++++ mm/list_lru.c | 16 +++++++++++-- 5 files changed, 104 insertions(+), 12 deletions(-) -- 1.8.3.1