Skip to content

Commit

Permalink
mm: account reaped page cache on inode cache pruning
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Konstantin Khlebnikov authored and Linus Torvalds committed Jan 11, 2012
1 parent f90ac39 commit 5f8aefd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,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);
}
Expand Down

0 comments on commit 5f8aefd

Please sign in to comment.