aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2011-12-02 19:21:51 -0500
committerWu Fengguang <fengguang.wu@intel.com>2011-12-07 21:49:29 -0500
commit82e230a07de3812a5e87a27979f033dad59172e3 (patch)
tree672ecaa3a1cf3585aa941491b2cf77ae38f1d8ff
parentc5c6343c4d75f9d3226e05a72e7861e967fc8099 (diff)
writeback: set max_pause to lowest value on zero bdi_dirty
Some trace shows lots of bdi_dirty=0 lines where it's actually some small value if w/o the accounting errors in the per-cpu bdi stats. In this case the max pause time should really be set to the smallest (non-zero) value to avoid IO queue underrun and improve throughput. Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
-rw-r--r--mm/page-writeback.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 17403e3a7c89..50f08241f981 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -989,8 +989,7 @@ static unsigned long bdi_max_pause(struct backing_dev_info *bdi,
989 * 989 *
990 * 8 serves as the safety ratio. 990 * 8 serves as the safety ratio.
991 */ 991 */
992 if (bdi_dirty) 992 t = min(t, bdi_dirty * HZ / (8 * bw + 1));
993 t = min(t, bdi_dirty * HZ / (8 * bw + 1));
994 993
995 /* 994 /*
996 * The pause time will be settled within range (max_pause/4, max_pause). 995 * The pause time will be settled within range (max_pause/4, max_pause).