linux/drivers
NeilBrown 435b71be20 md: improve the is_mddev_idle test
During a 'resync' or similar activity, md checks if the devices in the
array are otherwise active and winds back resync activity when they are.
This test in done in is_mddev_idle, and it is somewhat fragile - it
sometimes thinks there is non-sync io when there isn't.

The test compares the total sectors of io (disk_stat_read) with the sectors
of resync io (disk->sync_io).  This has problems because total sectors gets
updated when a request completes, while resync io gets updated when the
request is submitted.  The time difference can cause large differenced
between the two which do not actually imply non-resync activity.  The test
currently allows for some fuzz (+/- 4096) but there are some cases when it
is not enough.

The test currently looks for any (non-fuzz) difference, either positive or
negative.  This clearly is not needed.  Any non-sync activity will cause
the total sectors to grow faster than the sync_io count (never slower) so
we only need to look for a positive differences.

If we do this then the amount of in-flight sync io will never cause the
appearance of non-sync IO.  Once enough non-sync IO to worry about starts
happening, resync will be slowed down and the measurements will thus be
more precise (as there is less in-flight) and control of resync will still
be suitably responsive.

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>
2007-05-11 08:29:37 -07:00
..
acorn [ARM] Acorn: move the i2c bus driver into drivers/i2c 2007-03-04 20:40:50 +00:00
acpi Pull misc-for-upstream into release branch 2007-05-10 04:06:12 -04:00
amba uevent: use add_uevent_var() instead of open coding it 2007-04-27 10:57:29 -07:00
ata [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
atm PCI: Cleanup the includes of <linux/pci.h> 2007-05-02 19:02:35 -07:00
auxdisplay [S390] Kconfig: refine depends statements. 2007-05-10 15:46:07 +02:00
base Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-05-09 12:54:17 -07:00
block [S390] Kconfig: use common Kconfig files for s390. 2007-05-10 15:46:08 +02:00
bluetooth [Bluetooth] Correct SCO buffer for another Broadcom based dongle 2007-05-05 00:36:22 +02:00
cdrom mm: remove destroy_dirty_buffers from invalidate_bdev() 2007-05-07 12:12:55 -07:00
char Kill unused sesssion and group values in rocket driver 2007-05-11 08:29:36 -07:00
clocksource ACPI: correct pathname in comment 2007-04-25 14:27:06 -04:00
connector [NETLINK]: Switch cb_lock spinlock to mutex and allow to override it 2007-04-25 22:29:03 -07:00
cpufreq Add suspend-related notifications for CPU hotplug 2007-05-09 12:30:56 -07:00
crypto [S390] Kconfig: use common Kconfig files for s390. 2007-05-10 15:46:08 +02:00
dio
dma [S390] Kconfig: unwanted menus for s390. 2007-05-10 15:46:07 +02:00
edac [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
eisa virtual_eisa_root_init() should be __init 2007-05-08 11:15:02 -07:00
fc4
firewire firewire: Convert OHCI driver to use standard goto unwinding for error handling. 2007-05-10 18:24:14 +02:00
firmware remove "struct subsystem" as it is no longer needed 2007-05-02 18:57:59 -07:00
hid header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
hwmon Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 2007-05-10 11:50:51 -07:00
i2c Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 2007-05-10 11:50:51 -07:00
ide [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
ieee1394 Merge branch 'juju' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2007-05-10 13:30:08 -07:00
infiniband [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
input Fix ixp4xx compile error 2007-05-10 13:34:05 -07:00
isdn [S390] Kconfig: unwanted menus for s390. 2007-05-10 15:46:07 +02:00
kvm [S390] Kconfig: refine depends statements. 2007-05-10 15:46:07 +02:00
leds [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
macintosh Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6 2007-05-09 15:41:31 -07:00
mca mca: add integrated device bus matching 2007-05-09 12:30:49 -07:00
md md: improve the is_mddev_idle test 2007-05-11 08:29:37 -07:00
media [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
message [S390] Kconfig: refine depends statements. 2007-05-10 15:46:07 +02:00
mfd [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
misc Pull misc-for-upstream into release branch 2007-05-10 04:06:12 -04:00
mmc [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
mtd [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
net Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2007-05-10 13:32:24 -07:00
nubus
oprofile [PATCH] oprofile: fix potential deadlock on oprofilefs_lock 2007-03-28 13:58:02 -07:00
parisc header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
parport [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
pci Fix more "deprecated" spellos. 2007-05-09 07:19:14 +02:00
pcmcia fix hotplug for legacy platform drivers 2007-05-08 11:15:10 -07:00
pnp [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
ps3 Merge branch 'linux-2.6' 2007-05-08 13:37:51 +10:00
rapidio
rtc rtc-rs5c313.c: add error handling to avoid hardware hangup 2007-05-11 08:29:35 -07:00
s390 [S390] Kconfig: use common Kconfig files for s390. 2007-05-10 15:46:08 +02:00
sbus Fix misspellings collected by members of KJ list. 2007-05-09 07:14:03 +02:00
scsi Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6 2007-05-09 15:41:31 -07:00
serial Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2007-05-10 13:32:24 -07:00
sh
sn
spi MPC52xx PSC SPI master driver 2007-05-11 08:29:35 -07:00
tc [PATCH] Fix build error on zs serial driver 2007-04-04 21:12:47 -07:00
telephony [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
usb [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
video VIDEO: remove archaic if[] construct from Kconfig file 2007-05-11 08:29:37 -07:00
w1 [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
zorro Amiga Zorro bus: kill resource_size_t warnings 2007-05-04 17:59:08 -07:00
Kconfig firewire: put old and new stack into same Kconfig submenu 2007-03-09 22:02:38 +01:00
Makefile Merge branch 'juju' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2007-05-10 13:30:08 -07:00