summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2011-12-03 21:26:01 -0600
committerWu Fengguang <fengguang.wu@intel.com>2011-12-18 14:20:31 +0800
commit82791940545be38810dfd5e03ee701e749f04aab (patch)
tree427e4b1f535dfa483de6b71d1f59c13fd07a0ff9
parent5b9b357435a51ff14835c06d8b00765a4c68f313 (diff)
downloadlinux-82791940545be38810dfd5e03ee701e749f04aab.tar.gz
linux-82791940545be38810dfd5e03ee701e749f04aab.tar.bz2
linux-82791940545be38810dfd5e03ee701e749f04aab.zip
writeback: do strict bdi dirty_exceeded
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>
-rw-r--r--mm/page-writeback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 422cf4edab47..936dc7b61dc6 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -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;