writeback: eliminate work item allocation in bd_start_writeback()
authorJens Axboe <axboe@kernel.dk>
Sat, 30 Sep 2017 08:09:06 +0000 (02:09 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 4 Oct 2017 17:24:12 +0000 (11:24 -0600)
commit85009b4f5f0399669a44f07cb9a5622c0e71d419
tree9aa95947a827cf53f7d48cf187b99fa4f03411d2
parentfc13457f74dcf054b0d17efb7b94b46fdf17f412
writeback: eliminate work item allocation in bd_start_writeback()

Handle start-all writeback like we do periodic or kupdate
style writeback - by marking the bdi_writeback as needing a full
flush, and simply waking the thread. This eliminates the need to
allocate and queue a specific work item just for this purpose.

After this change, we truly only ever have one of them running at
any point in time. We mark the need to start all flushes, and the
writeback thread will clear it once it has processed the request.

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/fs-writeback.c
include/linux/backing-dev-defs.h
include/linux/writeback.h
include/trace/events/writeback.h