alistair23-linux/drivers/md
Dan Williams 8b3e6cdc53 md: introduce get_priority_stripe() to improve raid456 write performance
Improve write performance by preventing the delayed_list from dumping all its
stripes onto the handle_list in one shot.  Delayed stripes are now further
delayed by being held on the 'hold_list'.  The 'hold_list' is bypassed when:

  * a STRIPE_IO_STARTED stripe is found at the head of 'handle_list'
  * 'handle_list' is empty and i/o is being done to satisfy full stripe-width
    write requests
  * 'bypass_count' is less than 'bypass_threshold'.  By default the threshold
    is 1, i.e. every other stripe handled is a preread stripe provided the
    top two conditions are false.

Benchmark data:
System: 2x Xeon 5150, 4x SATA, mem=1GB
Baseline: 2.6.24-rc7
Configuration: mdadm --create /dev/md0 /dev/sd[b-e] -n 4 -l 5 --assume-clean
Test1: dd if=/dev/zero of=/dev/md0 bs=1024k count=2048
  * patched:  +33% (stripe_cache_size = 256), +25% (stripe_cache_size = 512)

Test2: tiobench --size 2048 --numruns 5 --block 4096 --block 131072 (XFS)
  * patched: +13%
  * patched + preread_bypass_threshold = 0: +37%

Changes since v1:
* reduce bypass_threshold from (chunk_size / sectors_per_chunk) to (1) and
  make it configurable.  This defaults to fairness and modest performance
  gains out of the box.
Changes since v2:
* [neilb@suse.de]: kill STRIPE_PRIO_HI and preread_needed as they are not
  necessary, the important change was clearing STRIPE_DELAYED in
  add_stripe_bio and this has been moved out to make_request for the hang
  fix.
* [neilb@suse.de]: simplify get_priority_stripe
* [dan.j.williams@intel.com]: reset the bypass_count when ->hold_list is
  sampled empty (+11%)
* [dan.j.williams@intel.com]: decrement the bypass_count at the detection
  of stripes being naturally promoted off of hold_list +2%.  Note, resetting
  bypass_count instead of decrementing on these events yields +4% but that is
  probably too aggressive.
Changes since v3:
* cosmetic fixups

Tested-by: James W. Laferriere <babydr@baby-dragons.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-28 08:58:42 -07:00
..
raid6test md: raid6: clean up the style of raid6test/test.c 2008-02-06 10:41:18 -08:00
.gitignore
bitmap.c md: reduce CPU wastage on idle md array with a write-intent bitmap 2008-03-10 18:01:19 -07:00
dm-bio-list.h
dm-bio-record.h
dm-crypt.c dm crypt: fix ctx pending 2008-03-28 14:45:22 -07:00
dm-delay.c
dm-emc.c
dm-exception-store.c dm: move include files 2008-04-25 13:26:55 +01:00
dm-hw-handler.c
dm-hw-handler.h
dm-io.c dm: unplug queues in threads 2008-04-25 13:26:57 +01:00
dm-ioctl.c dm ioctl: use uninitialized_var 2008-02-08 02:10:16 +00:00
dm-kcopyd.c dm: unplug queues in threads 2008-04-25 13:26:57 +01:00
dm-linear.c
dm-log.c dm: move include files 2008-04-25 13:26:55 +01:00
dm-mpath-hp-sw.c
dm-mpath-rdac.c
dm-mpath.c dm mpath: add missing static 2008-02-08 02:10:35 +00:00
dm-mpath.h
dm-path-selector.c
dm-path-selector.h
dm-raid1.c dm: unplug queues in threads 2008-04-25 13:26:57 +01:00
dm-round-robin.c
dm-snap.c dm: move include files 2008-04-25 13:26:55 +01:00
dm-snap.h dm kcopyd: clean interface 2008-04-25 13:26:44 +01:00
dm-stripe.c dm: stripe enhanced status return 2008-02-08 02:11:24 +00:00
dm-table.c dm table: remove unused dm_create_error_table 2008-04-25 13:27:00 +01:00
dm-target.c
dm-uevent.c md: replace remaining __FUNCTION__ occurrences 2008-04-28 08:58:42 -07:00
dm-uevent.h
dm-zero.c
dm.c dm: remove md argument from specific_minor 2008-04-25 13:27:02 +01:00
dm.h dm: expose macros 2008-04-25 13:26:53 +01:00
faulty.c md: change ITERATE_RDEV to rdev_for_each 2008-02-06 10:41:19 -08:00
Kconfig dm: targets no longer experimental 2008-02-08 02:10:32 +00:00
linear.c md: change ITERATE_RDEV to rdev_for_each 2008-02-06 10:41:19 -08:00
Makefile dm: move include files 2008-04-25 13:26:55 +01:00
md.c md: fix integer as NULL pointer warnings in md.c 2008-04-28 08:58:42 -07:00
mktables.c md: raid6: Fix mktable.c 2008-02-06 10:41:18 -08:00
multipath.c md: change ITERATE_RDEV to rdev_for_each 2008-02-06 10:41:19 -08:00
raid0.c md: change ITERATE_RDEV to rdev_for_each 2008-02-06 10:41:19 -08:00
raid1.c md: fix possible raid1/raid10 deadlock on read error during resync 2008-03-04 16:35:18 -08:00
raid5.c md: introduce get_priority_stripe() to improve raid456 write performance 2008-04-28 08:58:42 -07:00
raid6.h
raid6algos.c
raid6altivec.uc
raid6int.uc
raid6mmx.c
raid6recov.c
raid6sse1.c
raid6sse2.c
raid6x86.h
raid10.c md: the md RAID10 resync thread could cause a md RAID10 array deadlock 2008-03-04 16:35:18 -08:00
unroll.pl