From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Waychison Subject: [PATCH v1 7/8] Make drop_caches flush pending dput()s and iput()s Date: Fri, 16 Jan 2009 18:30:12 -0800 Message-ID: <20090117023012.20425.49587.stgit@crlf.corp.google.com> References: <20090117022936.20425.43248.stgit@crlf.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Return-path: Received: from smtp-out.google.com ([216.239.45.13]:20138 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935372AbZAQCaP (ORCPT ); Fri, 16 Jan 2009 21:30:15 -0500 In-Reply-To: <20090117022936.20425.43248.stgit@crlf.corp.google.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: When doing echo 3 > /proc/sys/vm/drop_caches, we wish to free up as much inode and dentry slab as possible. This path is updated to flush any pending iputs and dputs once the shrinkers are called. Signed-off-by: Mike Waychison --- fs/drop_caches.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/fs/drop_caches.c b/fs/drop_caches.c index 3e5637f..1e47470 100644 --- a/fs/drop_caches.c +++ b/fs/drop_caches.c @@ -60,6 +60,7 @@ static void drop_slab(void) do { nr_objects = shrink_slab(1000, GFP_KERNEL, 1000); } while (nr_objects > 10); + dput_drain_all(); } int drop_caches_sysctl_handler(ctl_table *table, int write,