Skip to content

Commit

Permalink
writeback: set max_pause to lowest value on zero bdi_dirty
Browse files Browse the repository at this point in the history
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
Wu Fengguang committed Dec 8, 2011
1 parent c5c6343 commit 82e230a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mm/page-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit 82e230a

Please sign in to comment.