[patch 30/35] fs: icache lazy LRU avoid LRU locking after IO operation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Now that inode LRU and writeback lists and locking are separated,
it makes sense to avoid LRU manipulation after completing a writeback,
and instead rely on lazy-LRU algorithm to do the work for us.

Signed-off-by: Nick Piggin <npiggin@xxxxxxxxx>

---
 fs/fs-writeback.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Index: linux-2.6/fs/fs-writeback.c
===================================================================
--- linux-2.6.orig/fs/fs-writeback.c	2010-10-19 14:19:00.000000000 +1100
+++ linux-2.6/fs/fs-writeback.c	2010-10-19 14:19:18.000000000 +1100
@@ -410,7 +410,11 @@
 			 * The inode is clean
 			 */
 			list_del_init(&inode->i_io);
-			if (list_empty(&inode->i_lru))
+
+			/*
+			 * Put it on the LRU if it is unused, otherwise lazy.
+			 */
+			if (!inode->i_count && list_empty(&inode->i_lru))
 				__inode_lru_list_add(inode);
 		}
 	}


--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux