From ec308f3e82d5d7c949e2d3d5b0f7959f6d841bbb Mon Sep 17 00:00:00 2001 From: Wu Fengguang Date: Fri, 2 Dec 2011 10:21:33 -0600 Subject: [PATCH] --- yaml --- r: 276632 b: refs/heads/master c: c5c6343c4d75f9d3226e05a72e7861e967fc8099 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/mm/page-writeback.c | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index f93b3ec18295..0276a7c08f7c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: aed21ad28b1323b2807faea019e5ac388a7bc837 +refs/heads/master: c5c6343c4d75f9d3226e05a72e7861e967fc8099 diff --git a/trunk/mm/page-writeback.c b/trunk/mm/page-writeback.c index 155efca4c123..17403e3a7c89 100644 --- a/trunk/mm/page-writeback.c +++ b/trunk/mm/page-writeback.c @@ -1148,6 +1148,19 @@ static void balance_dirty_pages(struct address_space *mapping, if (task_ratelimit) break; + /* + * In the case of an unresponding NFS server and the NFS dirty + * pages exceeds dirty_thresh, give the other good bdi's a pipe + * to go through, so that tasks on them still remain responsive. + * + * In theory 1 page is enough to keep the comsumer-producer + * pipe going: the flusher cleans 1 page => the task dirties 1 + * more page. However bdi_dirty has accounting errors. So use + * the larger and more IO friendly bdi_stat_error. + */ + if (bdi_dirty <= bdi_stat_error(bdi)) + break; + if (fatal_signal_pending(current)) break; }