From: Wu Fengguang Date: Sat, 3 Dec 2011 00:21:51 +0000 (-0600) Subject: writeback: set max_pause to lowest value on zero bdi_dirty X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=82e230a07de3812a5e87a27979f033dad59172e3;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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, * * 8 serves as the safety ratio. */ - if (bdi_dirty) - t = min(t, bdi_dirty * HZ / (8 * bw + 1)); + t = min(t, bdi_dirty * HZ / (8 * bw + 1)); /* * The pause time will be settled within range (max_pause/4, max_pause).