From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wu Fengguang Subject: Re: [PATCH 03/18] writeback: dirty rate control Date: Thu, 29 Sep 2011 19:57:12 +0800 Message-ID: <20110929115712.GA18183@localhost> References: <20110904015305.367445271@intel.com> <20110904020914.980576896@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Peter Zijlstra , Andrew Morton , Jan Kara , Christoph Hellwig , Dave Chinner , Greg Thelen , Minchan Kim , Vivek Goyal , Andrea Righi , linux-mm , LKML To: "linux-fsdevel@vger.kernel.org" Return-path: Content-Disposition: inline In-Reply-To: <20110904020914.980576896@intel.com> Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org A minor fix to this patch. While testing the fio mmap workload, bdi->dirty_ratelimit is observed to be knocked down to 1 and then brought up high in regular intervals. The showed up problem is, it took long delays to bring up bdi->dirty_ratelimit due to the round-down problem of the below task_ratelimit calculation: when dirty_ratelimit=1 and pos_ratio = 1.5, the resulted task_ratelimit will be 1, which fooled stops the logic from increasing dirty_ratelimit as long as pos_ratio < 2. The below change (from round-down to round-up) can nicely fix this problem. Thanks, Fengguang --- --- linux-next.orig/mm/page-writeback.c 2011-09-24 15:52:11.000000000 +0800 +++ linux-next/mm/page-writeback.c 2011-09-24 15:52:11.000000000 +0800 @@ -766,6 +766,7 @@ static void bdi_update_dirty_ratelimit(s */ task_ratelimit = (u64)dirty_ratelimit * pos_ratio >> RATELIMIT_CALC_SHIFT; + task_ratelimit++; /* it helps rampup dirty_ratelimit from tiny values */ /* * A linear estimation of the "balanced" throttle rate. The theory is, -- 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 internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org