kernel-hacking-2024-linux-s.../drivers/md
Mikulas Patocka 8d35d3e37e 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>
2011-01-13 19:59:50 +00:00
..
bitmap.c md: unplug writes to external bitmaps. 2010-10-29 16:40:32 +11:00
bitmap.h md: use sector_t in bitmap_get_counter 2010-10-28 17:32:26 +11:00
dm-bio-record.h
dm-crypt.c dm crypt: set key size early 2011-01-13 19:59:49 +00:00
dm-delay.c
dm-exception-store.c
dm-exception-store.h
dm-io.c
dm-ioctl.c dm ioctl: allow rename to fill empty uuid 2011-01-13 19:59:47 +00:00
dm-kcopyd.c dm kcopyd: delay unplugging 2011-01-13 19:59:50 +00:00
dm-linear.c
dm-log-userspace-base.c dm log userspace: trap all failed log construction errors 2011-01-13 19:59:49 +00:00
dm-log-userspace-transfer.c
dm-log-userspace-transfer.h
dm-log.c
dm-mpath.c dm mpath: disable blk_abort_queue 2011-01-13 19:59:46 +00:00
dm-mpath.h
dm-path-selector.c
dm-path-selector.h
dm-queue-length.c
dm-raid1.c dm raid1: support discard 2011-01-13 19:59:48 +00:00
dm-region-hash.c
dm-round-robin.c
dm-service-time.c
dm-snap-persistent.c workqueues: s/ON_STACK/ONSTACK/ 2010-10-26 16:52:14 -07:00
dm-snap-transient.c
dm-snap.c Merge branch 'for-2.6.37/barrier' of git://git.kernel.dk/linux-2.6-block 2010-10-22 17:07:18 -07:00
dm-stripe.c
dm-sysfs.c
dm-table.c Merge branch 'for-2.6.38/core' of git://git.kernel.dk/linux-2.6-block 2011-01-13 10:45:01 -08:00
dm-target.c
dm-uevent.c
dm-uevent.h
dm-zero.c
dm.c dm: remove dm_mutex after bkl conversion 2011-01-13 19:59:48 +00:00
dm.h
faulty.c md: use separate bio pool for each md device. 2010-10-28 17:36:15 +11:00
Kconfig
linear.c
linear.h
Makefile
md.c Merge branch 'for-2.6.38/core' of git://git.kernel.dk/linux-2.6-block 2011-01-13 10:45:01 -08:00
md.h md: use separate bio pool for each md device. 2010-10-28 17:36:15 +11:00
multipath.c
multipath.h
raid0.c
raid0.h
raid1.c md/raid1: really fix recovery looping when single good device fails. 2010-11-24 16:39:46 +11:00
raid1.h md/raid1: discard unused variable. 2010-10-29 16:40:33 +11:00
raid5.c md: use separate bio pool for each md device. 2010-10-28 17:36:15 +11:00
raid5.h
raid10.c md: protect against NULL reference when waiting to start a raid10. 2010-12-09 17:02:14 +11:00
raid10.h