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

Wu Fengguang
2009-09-09T15:08:32Z

[-- Attachment #1: writeback-requeue-congestion.patch --]
[-- Type: text/plain, Size: 1041 bytes --]

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@google.com>
Cc: Michael Rubin <mrubin@google.com>
Cc: Chad Talbott <ctalbott@google.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
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 {

--