From: Wu Fengguang Date: Mon, 8 Aug 2011 21:22:00 +0000 (-0600) Subject: writeback: fix dirtied pages accounting on redirty X-Git-Tag: v3.2.44~22 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40e5c2b17933a25380494548391126affae73c58;p=pandora-kernel.git writeback: fix dirtied pages accounting on redirty commit 2f800fbd777b792de54187088df19a7df0251254 upstream. De-account the accumulative dirty counters on page redirty. Page redirties (very common in ext4) will introduce mismatch between counters (a) and (b) a) NR_DIRTIED, BDI_DIRTIED, tsk->nr_dirtied b) NR_WRITTEN, BDI_WRITTEN This will introduce systematic errors in balanced_rate and result in dirty page position errors (ie. the dirty pages are no longer balanced around the global/bdi setpoints). Acked-by: Jan Kara Acked-by: Peter Zijlstra Signed-off-by: Wu Fengguang Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed