diff options
author | Nick Piggin <npiggin@suse.de> | 2009-02-18 17:48:18 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-18 18:37:54 -0500 |
commit | 1cf6e7d83bf334cc5916137862c920a97aabc018 (patch) | |
tree | 6bdbc4a98e9b332919beaeba0649797fff544795 /include/linux/mm.h | |
parent | 610d18f4128ebbd88845d0fc60cce67b49af881e (diff) |
mm: task dirty accounting fix
YAMAMOTO-san noticed that task_dirty_inc doesn't seem to be called properly for
cases where set_page_dirty is not used to dirty a page (eg. mark_buffer_dirty).
Additionally, there is some inconsistency about when task_dirty_inc is
called. It is used for dirty balancing, however it even gets called for
__set_page_dirty_no_writeback.
So rather than increment it in a set_page_dirty wrapper, move it down to
exactly where the dirty page accounting stats are incremented.
Cc: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 7dc04ff5ab89..10074212a35b 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1159,6 +1159,7 @@ extern int filemap_fault(struct vm_area_struct *, struct vm_fault *); | |||
1159 | 1159 | ||
1160 | /* mm/page-writeback.c */ | 1160 | /* mm/page-writeback.c */ |
1161 | int write_one_page(struct page *page, int wait); | 1161 | int write_one_page(struct page *page, int wait); |
1162 | void task_dirty_inc(struct task_struct *tsk); | ||
1162 | 1163 | ||
1163 | /* readahead.c */ | 1164 | /* readahead.c */ |
1164 | #define VM_MAX_READAHEAD 128 /* kbytes */ | 1165 | #define VM_MAX_READAHEAD 128 /* kbytes */ |