linux/block
Corrado Zoccolo 3dde36ddea cfq-iosched: rework seeky detection
Current seeky detection is based on average seek lenght.
This is suboptimal, since the average will not distinguish between:
* a process doing medium sized seeks
* a process doing some sequential requests interleaved with larger seeks
and even a medium seek can take lot of time, if the requested sector
happens to be behind the disk head in the rotation (50% probability).

Therefore, we change the seeky queue detection to work as follows:
* each request can be classified as sequential if it is very close to
  the current head position, i.e. it is likely in the disk cache (disks
  usually read more data than requested, and put it in cache for
  subsequent reads). Otherwise, the request is classified as seeky.
* an history window of the last 32 requests is kept, storing the
  classification result.
* A queue is marked as seeky if more than 1/8 of the last 32 requests
  were seeky.

This patch fixes a regression reported by Yanmin, on mmap 64k random
reads.

Reported-by: Yanmin Zhang <yanmin_zhang@linux.intel.com>
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2010-02-28 19:41:25 +01:00
..
blk-barrier.c block: Honor the gfp_mask for alloc_page() in blkdev_issue_discard() 2009-12-29 08:53:54 +01:00
blk-cgroup.c cfq: Remove useless css reference get 2010-02-26 08:56:15 +01:00
blk-cgroup.h cfq: Remove useless css reference get 2010-02-26 08:56:15 +01:00
blk-core.c block: Consolidate phys_segment and hw_segment limits 2010-02-26 13:58:08 +01: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: removed unused as_io_context 2010-01-11 14:29:20 +01:00
blk-iopoll.c tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
blk-map.c block: Use accessor functions for queue limits 2009-05-22 23:22:54 +02:00
blk-merge.c block: Consolidate phys_segment and hw_segment limits 2010-02-26 13:58:08 +01:00
blk-settings.c block: Consolidate phys_segment and hw_segment limits 2010-02-26 13:58:08 +01:00
blk-softirq.c generic-ipi: remove CSD_FLAG_WAIT 2009-02-25 14:13:44 +01:00
blk-sysfs.c block: Added in stricter no merge semantics for block I/O 2010-01-29 09:04:08 +01: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 block: jiffies fixes 2009-11-11 13:47:45 +01:00
cfq-iosched.c cfq-iosched: rework seeky detection 2010-02-28 19:41:25 +01:00
compat_ioctl.c block: Allow devices to indicate whether discarded blocks are zeroed 2009-12-03 09:24:48 +01:00
deadline-iosched.c block: convert to pos and nr_sectors accessors 2009-05-11 09:50:54 +02:00
elevator.c block: Added in stricter no merge semantics for block I/O 2010-01-29 09:04:08 +01:00
genhd.c block: Fix discard alignment calculation and printing 2010-01-11 14:29:19 +01:00
ioctl.c block: Allow devices to indicate whether discarded blocks are zeroed 2009-12-03 09:24:48 +01:00
Kconfig blkio: Some debugging aids for CFQ 2009-12-03 19:28:52 +01:00
Kconfig.iosched blkio: Allow CFQ group IO scheduling even when CFQ is a module 2009-12-04 16:38:14 +01:00
Makefile blkio: Introduce blkio controller cgroup interface 2009-12-03 19:28:51 +01:00
noop-iosched.c block: get rid of elevator_t typedef 2008-12-29 08:29:50 +01:00
scsi_ioctl.c block/scsi_ioctl.c: quiet sparse noise 2009-11-04 09:10:33 +01:00