linux/block
Shaohua Li 4b27e1bb44 cfq-iosched: limit coop preemption
CFQ has an optimization for cooperated applications. if several
io-context have close requests, they will get boost. But the
optimization get abused. Considering thread a, b, which work on one
file. a reads sectors s, s+2, s+4, ...; b reads sectors s+1, s+3, s
+5, ... Both a and b are sequential read, so they can open idle window.
a reads a sector s and goes to idle window and wakeup b. b reads sector
s+1, since in current implementation, cfq_should_preempt() thinks a and
b are cooperators, b will preempt a. b then reads sector s+1 and goes to
idle window and wakeup a. for the same reason, a will preempt b and
reads s+2. a and b will continue the circle. The circle will be very
long, and a and b will occupy whole disk queue. Other applications will
nearly have no chance to run.

Fix this limiting coop preempt until a queue is scheduled normally
again.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Acked-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-11-03 20:25:02 +01:00
..
Kconfig Make SCSI SG v4 driver enabled by default and remove EXPERIMENTAL dependency, since udev depends on BSG 2009-08-04 22:10:17 +02:00
Kconfig.iosched update I/O sched Kconfig help texts - CFQ is now default, not AS. 2007-02-17 20:08:22 +01:00
Makefile block: add blk-iopoll, a NAPI like approach for block devices 2009-09-11 14:33:31 +02:00
as-iosched.c percpu: clean up percpu variable definitions 2009-06-24 15:13:48 +09:00
blk-barrier.c block: allow large discard requests 2009-10-01 21:19:34 +02:00
blk-core.c block: silently error unsupported empty barriers too 2009-10-24 14:14:31 +02:00
blk-exec.c block: don't set REQ_NOMERGE unnecessarily 2009-04-28 07:37:33 +02:00
blk-integrity.c block: fix improper kobject release in blk_integrity_unregister 2009-07-28 09:11:14 +02:00
blk-ioc.c block: prevent possible io_context->refcount overflow 2009-06-10 23:07:15 +02:00
blk-iopoll.c block: use interrupts disabled version of raise_softirq_irqoff() 2009-09-11 14:33:32 +02:00
blk-map.c block: Use accessor functions for queue limits 2009-05-22 23:22:54 +02:00
blk-merge.c block: Seperate read and write statistics of in_flight requests v2 2009-10-06 20:16:55 +02:00
blk-settings.c blk-settings: fix function parameter kernel-doc notation 2009-10-12 08:20:47 +02:00
blk-softirq.c generic-ipi: remove CSD_FLAG_WAIT 2009-02-25 14:13:44 +01:00
blk-sysfs.c Add missing blk_trace_remove_sysfs to be in pair with blk_trace_init_sysfs 2009-10-01 21:15:46 +02:00
blk-tag.c block: use proper BLK_RW_ASYNC in blk_queue_start_tag() 2009-10-06 20:19:02 +02:00
blk-timeout.c block: clean up misc stuff after block layer timeout conversion 2009-04-28 07:37:34 +02:00
blk.h block: implement mixed merge of different failfast requests 2009-09-11 14:33:30 +02:00
bsg.c Driver-Core: extend devnode callbacks to provide permissions 2009-09-19 12:50:38 -07:00
cfq-iosched.c cfq-iosched: limit coop preemption 2009-11-03 20:25:02 +01:00
compat_ioctl.c block: Topology ioctls 2009-10-03 20:52:01 +02:00
deadline-iosched.c block: convert to pos and nr_sectors accessors 2009-05-11 09:50:54 +02:00
elevator.c elv_iosched_store(): fix strstrip() misuse 2009-10-09 08:48:08 +02:00
genhd.c block: Seperate read and write statistics of in_flight requests v2 2009-10-06 20:16:55 +02:00
ioctl.c block: Topology ioctls 2009-10-03 20:52:01 +02:00
noop-iosched.c block: get rid of elevator_t typedef 2008-12-29 08:29:50 +01:00
scsi_ioctl.c block: call blk_scsi_ioctl_init() 2009-07-10 20:31:53 +02:00