diff options
| author | Jan Kara <jack@suse.cz> | 2013-07-12 17:30:07 +0200 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2016-09-01 12:07:00 +0200 |
| commit | 4699c10134e478bd359bea439f6061fc8d9375b3 (patch) | |
| tree | 764604b39bbc8caaa10f3492bbf4c2a7e78daa7f /include/linux/timerqueue.h | |
| parent | 54405f1d7c45251ca0c6f5a18779d51ba9ae0dd1 (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. 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.
CC: stable@vger.kernel.org
Reported-by: Paul Taysom <taysom@chromium.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Cristoforo Cataldo <cristoforo.cataldo@gmail.com>
Signed-off-by: flar2 <asegaert@gmail.com>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
