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

From: Wu Fengguang
Date: Wed Sep 09 2009 - 11:08:42 EST


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-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/