Skip to content
This repository
Browse code

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>
  • Loading branch information...
commit 82e230a07de3812a5e87a27979f033dad59172e3 1 parent c5c6343
Wu Fengguang authored

Showing 1 changed file with 1 addition and 2 deletions. Show diff stats Hide diff stats

  1. +1 2  mm/page-writeback.c
3  mm/page-writeback.c
@@ -989,8 +989,7 @@ static unsigned long bdi_max_pause(struct backing_dev_info *bdi,
989 989 *
990 990 * 8 serves as the safety ratio.
991 991 */
992   - if (bdi_dirty)
993   - t = min(t, bdi_dirty * HZ / (8 * bw + 1));
  992 + t = min(t, bdi_dirty * HZ / (8 * bw + 1));
994 993
995 994 /*
996 995 * The pause time will be settled within range (max_pause/4, max_pause).

0 comments on commit 82e230a

Please sign in to comment.
Something went wrong with that request. Please try again.