From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wu Fengguang Subject: [PATCH 25/47] writeback: make it easier to break from a dirty exceeded bdi Date: Mon, 13 Dec 2010 14:43:14 +0800 Message-ID: <20101213064840.028400662@intel.com> References: <20101213064249.648862451@intel.com> Cc: Jan Kara , Wu Fengguang To: Andrew Morton Return-path: CC: Christoph Hellwig CC: Trond Myklebust CC: Dave Chinner CC: Theodore Ts'o CC: Chris Mason CC: Peter Zijlstra CC: Mel Gorman CC: Rik van Riel CC: KOSAKI Motohiro CC: Greg Thelen CC: Minchan Kim Cc: linux-mm Cc: Cc: LKML Content-Disposition: inline; filename=writeback-bdi-throttle-break-fix.patch Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org The break is designed mainly to help the single task case. For the 1-dd case, it looks better to lower the break threshold to 125ms data. After all, it's not easy for the dirty pages to drop by 250ms worth of data when you only slept 200ms (note: the max pause time has been doubled for reducing overheads when there are lots of concurrent dirtiers). Signed-off-by: Wu Fengguang --- mm/page-writeback.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) --- linux-next.orig/mm/page-writeback.c 2010-12-09 12:19:22.000000000 +0800 +++ linux-next/mm/page-writeback.c 2010-12-09 12:26:56.000000000 +0800 @@ -652,13 +652,13 @@ static void balance_dirty_pages(struct a * bdi_dirty = nr_dirty * = (background_thresh + dirty_thresh) / 2 * >> bdi_thresh - * Then the task could be blocked for a dozen second to flush - * all the exceeded (bdi_dirty - bdi_thresh) pages. So offer a - * complementary way to break out of the loop when 250ms worth + * Then the task could be blocked for many seconds to flush all + * the exceeded (bdi_dirty - bdi_thresh) pages. So offer a + * complementary way to break out of the loop when 125ms worth * of dirty pages have been cleaned during our pause time. */ - if (nr_dirty < dirty_thresh && - bdi_prev_dirty - bdi_dirty > (long)bdi->write_bandwidth / 4) + if (nr_dirty <= dirty_thresh && + bdi_prev_dirty - bdi_dirty > (long)bdi->write_bandwidth / 8) break; bdi_prev_dirty = bdi_dirty; -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: email@kvack.org