HomeFreeBSD

Reinstate zvol_taskq to fix aio on zvol

Description

Reinstate zvol_taskq to fix aio on zvol

Commit 37f9dac removed the zvol_taskq for processing zvol requests.
This was removed as part of switching to make_request_fn and was
motivated by a concern at the time over dispatch latency.

However, this also made all bio request synchronous, and caused
serious performance issues as the bio submitter would wait for
every bio it submitted, effectively making the IO depth 1.

This patch reinstate zvol_taskq, and to make sure overlapped I/Os
are ordered properly, we take range lock in zvol_request, and pass
it along with bio to the I/O functions zvol_{write,discard,read}.

In order to facilitate benchmarks a zvol_request_sync module
option was added to switch between sync and async request handling.
For the moment, the default behavior is synchronous but this is
likely to change pending additional testing.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Closes #5824

Details

Provenance
Chunwei Chen <david.chen@osnexus.com>Authored on Feb 23 2017, 12:08 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Apr 26 2017, 8:54 PM
Parents
rGe815485fe9e1: Update documentation for zfs_vdev_queue_depth_pct
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG692e55b8fea0: Reinstate zvol_taskq to fix aio on zvol (authored by Chunwei Chen <david.chen@osnexus.com>).Apr 26 2017, 8:54 PM