]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mm: account reaped page cache on inode cache pruning
authorKonstantin Khlebnikov <khlebnikov@openvz.org>
Thu, 8 Dec 2011 04:41:41 +0000 (15:41 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 13 Dec 2011 06:43:10 +0000 (17:43 +1100)
Inode cache pruning indirectly reclaims page-cache by invalidating mapping
pages.  Let's account them into reclaim-state to notice this progress in
memory reclaimer.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Dave Chinner <david@fromorbit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/inode.c

index ee4e66b998f40d170b1822db68875df73d445db6..1f6c48d59a0dfe8402dc59f484e3ca0fca3cd08a 100644 (file)
@@ -692,6 +692,8 @@ void prune_icache_sb(struct super_block *sb, int nr_to_scan)
        else
                __count_vm_events(PGINODESTEAL, reap);
        spin_unlock(&sb->s_inode_lru_lock);
+       if (current->reclaim_state)
+               current->reclaim_state->reclaimed_slab += reap;
 
        dispose_list(&freeable);
 }