summaryrefslogtreecommitdiffstats
path: root/arch/mips/pci
diff options
context:
space:
mode:
authorDave Chinner <david@fromorbit.com>2011-08-23 18:56:24 +1000
committerAl Viro <viro@zeniv.linux.org.uk>2012-01-09 19:22:52 -0500
commitb48f03b319ba78f3abf9a7044d1f436d8d90f4f9 (patch)
tree7ddc8f545787d28825413946519ed88ea19edb24 /arch/mips/pci
parent3c5184ef1216dd476c9c67f22a199d90ac4d5892 (diff)
downloadblackbird-op-linux-b48f03b319ba78f3abf9a7044d1f436d8d90f4f9.tar.gz
blackbird-op-linux-b48f03b319ba78f3abf9a7044d1f436d8d90f4f9.zip
dcache: use a dispose list in select_parent
select_parent currently abuses the dentry cache LRU to provide cleanup features for child dentries that need to be freed. It moves them to the tail of the LRU, then tells shrink_dcache_parent() to calls __shrink_dcache_sb to unconditionally move them to a dispose list (as DCACHE_REFERENCED is ignored). __shrink_dcache_sb() has to relock the dentries to move them off the LRU onto the dispose list, but otherwise does not touch the dentries that select_parent() moved to the tail of the LRU. It then passses the dispose list to shrink_dentry_list() which tries to free the dentries. IOWs, the use of __shrink_dcache_sb() is superfluous - we can build exactly the same list of dentries for disposal directly in select_parent() and call shrink_dentry_list() instead of calling __shrink_dcache_sb() to do that. This means that we avoid long holds on the lru lock walking the LRU moving dentries to the dispose list We also avoid the need to relock each dentry just to move it off the LRU, reducing the numebr of times we lock each dentry to dispose of them in shrink_dcache_parent() from 3 to 2 times. Further, we remove one of the two callers of __shrink_dcache_sb(). This also means that __shrink_dcache_sb can be moved into back into prune_dcache_sb() and we no longer have to handle referenced dentries conditionally, simplifying the code. Signed-off-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/mips/pci')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud