Skip to content

Commit

Permalink
writeback: do strict bdi dirty_exceeded
Browse files Browse the repository at this point in the history
This helps to reduce dirty throttling polls and hence CPU overheads.

bdi->dirty_exceeded typically only helps when suddenly starting 100+
dd's on a disk, in which case the dd's may need to poll
balance_dirty_pages() earlier than tsk->nr_dirtied_pause.

CC: Jan Kara <jack@suse.cz>
CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
  • Loading branch information
Wu Fengguang committed Dec 18, 2011
1 parent 5b9b357 commit 8279194
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/page-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,7 @@ static void balance_dirty_pages(struct address_space *mapping,
bdi_stat(bdi, BDI_WRITEBACK);
}

dirty_exceeded = (bdi_dirty > bdi_thresh) ||
dirty_exceeded = (bdi_dirty > bdi_thresh) &&
(nr_dirty > dirty_thresh);
if (dirty_exceeded && !bdi->dirty_exceeded)
bdi->dirty_exceeded = 1;
Expand Down

0 comments on commit 8279194

Please sign in to comment.