diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2011-08-08 15:22:00 -0600 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2013-04-25 20:25:43 +0100 |
commit | 40e5c2b17933a25380494548391126affae73c58 (patch) | |
tree | 7dfb82319c4b1955d3b74b09fdd9050f193420cd /include | |
parent | 2f0500f50b8ee7b33407d74f00f5f17ac1d1473e (diff) |
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 <jack@suse.cz>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/writeback.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index a378c295851..7e85d454c16 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -195,6 +195,8 @@ void writeback_set_ratelimit(void); void tag_pages_for_writeback(struct address_space *mapping, pgoff_t start, pgoff_t end); +void account_page_redirty(struct page *page); + /* pdflush.c */ extern int nr_pdflush_threads; /* Global so it can be exported to sysctl read-only. */ |