diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2011-01-13 22:59:50 +0300 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2011-01-13 22:59:50 +0300 |
commit | 8d35d3e37eed884ba15229a146df846f399909b4 (patch) | |
tree | 795c77c941229f413750e99242f1b2199bebe7a1 /drivers/base | |
parent | 4a038677df4da84e42fd68b5ab2dfa4d82baa444 (diff) | |
download | linux-8d35d3e37eed884ba15229a146df846f399909b4.tar.xz |
dm kcopyd: delay unplugging
Make kcopyd merge more I/O requests by using device unplugging.
Without this patch, each I/O request is dispatched separately to the device.
If the device supports tagged queuing, there are many small requests sent
to the device. To improve performance, this patch will batch as many requests
as possible, allowing the queue to merge consecutive requests, and send them
to the device at once.
In my tests (15k SCSI disk), this patch improves sequential write throughput:
Sequential write throughput (chunksize of 4k, 32k, 512k)
unpatched: 15.2, 18.5, 17.5 MB/s
patched: 14.4, 22.6, 23.0 MB/s
In most common uses (snapshot or two-way mirror), kcopyd is only used for
two devices, one for reading and the other for writing, thus this optimization
is implemented only for two devices. The optimization may be extended to n-way
mirrors with some code complexity increase.
We keep track of two block devices to unplug (one for read and the
other for write) and unplug them when exiting "do_work" thread. If
there are more devices used (in theory it could happen, in practice it
is rare), we unplug immediately.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/base')
0 files changed, 0 insertions, 0 deletions