block: Reserve only one queue tag for sync IO if only 3 tags are available
authorJan Kara <jack@suse.cz>
Fri, 28 Jun 2013 19:32:27 +0000 (21:32 +0200)
committerJens Axboe <axboe@fb.com>
Mon, 30 Mar 2015 18:54:53 +0000 (12:54 -0600)
commit42b230cf7643c60c36628071a6b9fb2046678315
treee7175c24756a276f6c29b192c6a48ef87bea0d59
parent7e0c6cc1c7e5afd5db3da19a7766286642dee40d
block: Reserve only one queue tag for sync IO if only 3 tags are available

In case a device has three tags available we still reserve two of them
for sync IO. That leaves only a single tag for async IO such as
writeback from flusher thread which results in poor performance.

Allow async IO to consume two tags in case queue has three tag availabe
to get a decent async write performance.

This patch improves streaming write performance on a machine with such disk
from ~21 MB/s to ~52 MB/s. Also postmark throughput in presence of
streaming writer improves from 8 to 12 transactions per second so sync
IO doesn't seem to be harmed in presence of heavy async writer.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-tag.c