The patch titled writeback: make reasonable gap between the dirty/background thresholds has been removed from the -mm tree. Its filename was writeback-make-reasonable-gap-between-the-dirty-background-thresholds.patch This patch was dropped because an updated version will be merged The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: writeback: make reasonable gap between the dirty/background thresholds From: Wu Fengguang <fengguang.wu@xxxxxxxxx> The change is virtually a no-op for the majority users that use the default 10/20 background/dirty ratios. For others don't know why they are setting background ratio close enough to dirty ratio. Someone must set background ratio equal to dirty ratio, but no one seems to notice or complain that it's then silently halved under the hood.. Signed-off-by: Wu Fengguang <fengguang.wu@xxxxxxxxx> Cc: Chris Mason <chris.mason@xxxxxxxxxx> Cc: Dave Chinner <david@xxxxxxxxxxxxx> Cc: Jan Kara <jack@xxxxxxx> Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> Cc: Jens Axboe <axboe@xxxxxxxxx> Cc: Jan Kara <jack@xxxxxxx> Cc: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx> Cc: Li Shaohua <shaohua.li@xxxxxxxxx> Cc: Theodore Ts'o <tytso@xxxxxxx> Cc: Richard Kennedy <richard@xxxxxxxxxxxxxxx> Cc: Christoph Hellwig <hch@xxxxxx> Cc: Mel Gorman <mel@xxxxxxxxx> Cc: Rik van Riel <riel@xxxxxxxxxx> Cc: Michael Rubin <mrubin@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/page-writeback.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff -puN mm/page-writeback.c~writeback-make-reasonable-gap-between-the-dirty-background-thresholds mm/page-writeback.c --- a/mm/page-writeback.c~writeback-make-reasonable-gap-between-the-dirty-background-thresholds +++ a/mm/page-writeback.c @@ -403,8 +403,15 @@ void global_dirty_limits(unsigned long * else background = (dirty_background_ratio * available_memory) / 100; - if (background >= dirty) - background = dirty / 2; + /* + * Ensure at least 1/4 gap between background and dirty thresholds, so + * that when dirty throttling starts at (background + dirty)/2, it's at + * the entrance of bdi soft throttle threshold, so as to avoid being + * hard throttled. + */ + if (background > dirty - dirty * 2 / BDI_SOFT_DIRTY_LIMIT) + background = dirty - dirty * 2 / BDI_SOFT_DIRTY_LIMIT; + tsk = current; if (tsk->flags & PF_LESS_THROTTLE || rt_task(tsk)) { background += background / 4; _ Patches currently in -mm which might be from fengguang.wu@xxxxxxxxx are origin.patch writeback-scale-down-max-throttle-bandwidth-on-concurrent-dirtiers.patch writeback-add-trace-event-for-balance_dirty_pages.patch writeback-make-nr_to_write-a-per-file-limit.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html