[RFC][PATCH 6/7] writeback: dont abort inode on congestion

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

 



Retry writeback of the current inode when encountered congestion,
instead of redirting it, which may have the problems
- slow down writeback pace
- lead to small writeback io

Cc: Martin Bligh <mbligh@xxxxxxxxxx>
Cc: Michael Rubin <mrubin@xxxxxxxxxx>
Cc: Chad Talbott <ctalbott@xxxxxxxxxx>
Signed-off-by: Wu Fengguang <fengguang.wu@xxxxxxxxx>
---
 fs/fs-writeback.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- linux.orig/fs/fs-writeback.c	2009-09-09 21:55:19.000000000 +0800
+++ linux/fs/fs-writeback.c	2009-09-09 22:04:23.000000000 +0800
@@ -460,9 +460,11 @@ writeback_single_inode(struct inode *ino
 			 * sometimes bales out without doing anything.
 			 */
 			inode->i_state |= I_DIRTY_PAGES;
-			if (wbc->nr_to_write <= 0) {
+			if (wbc->encountered_congestion ||
+			    wbc->nr_to_write <= 0) {
 				/*
-				 * slice used up: queue for next turn
+				 * if slice used up, queue for next round;
+				 * otherwise continue this inode after return
 				 */
 				requeue_partial_io(wbc, inode);
 			} else {

-- 

--
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