Re: [PATCH 03/18] writeback: dirty rate control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx.  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: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]