diff options
author | Tejun Heo <tj@kernel.org> | 2015-05-23 00:13:48 +0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-06-02 17:33:36 +0300 |
commit | e79729123f6392b36450113c6c52074b7d389c85 (patch) | |
tree | d00283792a97dbae3d4b6bfc9eb9817e2b1fad59 /mm | |
parent | 95a46c65e3c09edb9f17dabf2dc16670cd328739 (diff) | |
download | linux-e79729123f6392b36450113c6c52074b7d389c85.tar.xz |
writeback: don't issue wb_writeback_work if clean
There are several places in fs/fs-writeback.c which queues
wb_writeback_work without checking whether the target wb
(bdi_writeback) has dirty inodes or not. The only thing
wb_writeback_work does is writing back the dirty inodes for the target
wb and queueing a work item for a clean wb is essentially noop. There
are some side effects such as bandwidth stats being updated and
triggering tracepoints but these don't affect the operation in any
meaningful way.
This patch makes all writeback_inodes_sb_nr() and sync_inodes_sb()
skip wb_queue_work() if the target bdi is clean. Also, it moves
dirtiness check from wakeup_flusher_threads() to
__wb_start_writeback() so that all its callers benefit from the check.
While the overhead incurred by scheduling a noop work isn't currently
significant, the overhead may be higher with cgroup writeback support
as we may end up issuing noop work items to a lot of clean wb's.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions