linux/block
Jeff Moyer 796d5116c4 iosched: prevent aliased requests from starving other I/O
Hi, Jens,

If you recall, I posted an RFC patch for this back in July of last year:
http://lkml.org/lkml/2010/7/13/279

The basic problem is that a process can issue a never-ending stream of
async direct I/Os to the same sector on a device, thus starving out
other I/O in the system (due to the way the alias handling works in both
cfq and deadline).  The solution I proposed back then was to start
dispatching from the fifo after a certain number of aliases had been
dispatched.  Vivek asked why we had to treat aliases differently at all,
and I never had a good answer.  So, I put together a simple patch which
allows aliases to be added to the rb tree (it adds them to the right,
though that doesn't matter as the order isn't guaranteed anyway).  I
think this is the preferred solution, as it doesn't break up time slices
in CFQ or batches in deadline.  I've tested it, and it does solve the
starvation issue.  Let me know what you think.

Cheers,
Jeff

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2011-06-02 21:19:05 +02:00
..
Kconfig kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT 2011-01-20 17:02:05 -08:00
Kconfig.iosched blk-cgroup: config options re-arrangement 2010-04-26 19:27:56 +02:00
Makefile Merge branch 'for-2.6.37/barrier' of git://git.kernel.dk/linux-2.6-block 2010-10-22 17:07:18 -07:00
blk-cgroup.c cgroups: add per-thread subsystem callbacks 2011-05-26 17:12:34 -07:00
blk-cgroup.h cfq-iosched: Make IO merge related stats per cpu 2011-05-23 10:02:19 +02:00
blk-core.c block: export blk_{get,put}_queue() 2011-05-27 07:45:45 +02:00
blk-exec.c block: Remove 'plug/unplug' comment in blk_execute_rq_nowait 2011-05-05 15:10:05 -06:00
blk-flush.c block: hold queue if flush is running for non-queueable flush drive 2011-05-06 11:36:25 -06:00
blk-integrity.c dm: improve block integrity support 2011-04-05 23:52:43 +02:00
blk-ioc.c blk-cgroup: Initialize ioc->cgroup_changed at ioc creation time 2011-05-23 19:35:04 +02:00
blk-iopoll.c tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
blk-lib.c blkdev: Do not return -EOPNOTSUPP if discard is supported 2011-05-06 19:30:01 -06:00
blk-map.c block: check for proper length of iov entries earlier in blk_rq_map_user_iov() 2010-11-29 10:04:50 +01:00
blk-merge.c block: attempt to merge with existing requests on plug flush 2011-03-21 10:14:27 +01:00
blk-settings.c block: Fix discard topology stacking and reporting 2011-05-18 10:37:35 +02:00
blk-softirq.c generic-ipi: remove CSD_FLAG_WAIT 2009-02-25 14:13:44 +01:00
blk-sysfs.c Merge commit 'v2.6.39' into for-2.6.40/core 2011-05-20 20:33:15 +02:00
blk-tag.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
blk-throttle.c blk-throttle: Make no throttling rule group processing lockless 2011-05-20 20:34:53 +02:00
blk-timeout.c block: ensure jiffies wrap is handled correctly in blk_rq_timed_out_timer 2010-04-21 17:42:08 +02:00
blk.h Merge branch 'for-linus' into for-2.6.40/core 2011-05-20 20:36:16 +02:00
bsg.c [SCSI] bsg: correct fault if queue object removed while dev_t open 2010-12-09 09:41:14 -06:00
cfq-iosched.c iosched: prevent aliased requests from starving other I/O 2011-06-02 21:19:05 +02:00
cfq.h blk-cgroup: Add unaccounted time to timeslice_used. 2011-03-12 16:54:00 +01:00
compat_ioctl.c BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
deadline-iosched.c iosched: prevent aliased requests from starving other I/O 2011-06-02 21:19:05 +02:00
elevator.c iosched: prevent aliased requests from starving other I/O 2011-06-02 21:19:05 +02:00
genhd.c block: always allocate genhd->ev if check_events is implemented 2011-05-26 21:06:50 +02:00
ioctl.c block: fix refcounting in BLKBSZSET 2011-02-24 08:54:21 -08:00
noop-iosched.c block: remove per-queue plugging 2011-03-10 08:52:07 +01:00
scsi_ioctl.c block: take care not to overflow when calculating total iov length 2010-11-10 14:40:42 +01:00