]> git.baikalelectronics.ru Git - kernel.git/commit
fs: Implement lazy LRU updates for inodes
authorNick Piggin <npiggin@suse.de>
Sat, 23 Oct 2010 10:55:17 +0000 (06:55 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 26 Oct 2010 01:26:09 +0000 (21:26 -0400)
commitb924029cae85bfbb857f40eb5f9dff83bd1cf660
tree7ea2ceea24a4e070259a4585b2748c9e2c070ee0
parent6ee39b4c5c2119cb8e92f426d5940e1e97fc8d79
fs: Implement lazy LRU updates for inodes

Convert the inode LRU to use lazy updates to reduce lock and
cacheline traffic.  We avoid moving inodes around in the LRU list
during iget/iput operations so these frequent operations don't need
to access the LRUs. Instead, we defer the refcount checks to
reclaim-time and use a per-inode state flag, I_REFERENCED, to tell
reclaim that iget has touched the inode in the past. This means that
only reclaim should be touching the LRU with any frequency, hence
significantly reducing lock acquisitions and the amount contention
on LRU updates.

This also removes the inode_in_use list, which means we now only
have one list for tracking the inode LRU status. This makes it much
simpler to split out the LRU list operations under it's own lock.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/fs-writeback.c
fs/inode.c
include/linux/fs.h
include/linux/writeback.h