diff options
| author | Jan Kara <jack@suse.cz> | 2013-09-11 21:22:22 +0000 |
|---|---|---|
| committer | John Brewer <gzroms@hotmail.com> | 2014-08-03 21:00:43 -0400 |
| commit | 0524a057d43c8751ec444b335e2cc5659ed64b24 (patch) | |
| tree | 2bdbf8fa24ebf05784c49d2f60e7434e37c9d0fd /net/lapb/lapb_timer.c | |
| parent | 4d993a89f3a09f86aa7233fffd7cc9b9ebe5440e (diff) | |
writeback: fix occasional slow sync(1)
In case when system contains no dirty pages, wakeup_flusher_threads() will
submit WB_SYNC_NONE writeback for 0 pages so wb_writeback() exits
immediately without doing anything, even though there are dirty inodes in
the system. Thus sync(1) will write all the dirty inodes from a
WB_SYNC_ALL writeback pass which is slow.
Fix the problem by using get_nr_dirty_pages() in wakeup_flusher_threads()
instead of calculating number of dirty pages manually. That function also
takes number of dirty inodes into account.
Signed-off-by: Jan Kara <jack@suse.cz>
Reported-by: Paul Taysom <taysom@chromium.org>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions
