linux/drivers/block
Konrad Rzeszutek Wilk 013c3ca184 xen/blkback: Stick REQ_SYNC on WRITEs to deal with CFQ I/O scheduler.
If one runs a simple fio request with random read/write with a
20%/80% ratio, the numbers are incredibly bad when using the CFQ scheduler.

IOmeter       |       |      |          |
64K, randrw   |  NOOP | CFQ  | deadline |
randrwmix=80  |       |      |          |
--------------+-------+------+----------+
blkback       |103/27 |32/10 | 102/27   |
--------------+-------+------+----------+
QEMU qdisk    |103/27 |102/27| 102/27   |

The problem as explained by Vivek Goyal was:

".. that difference is that sync vs async requests. In the case of
a kernel thread submitting IO, [..] all the WRITES might be being
considered as async and will go in a different queue. If you mix those
with some READS, they are always sync and will go in differnet queue.
In presence of sync queue, CFQ will idle and choke up WRITES in
an attempt to improve latencies of READs.

In case of AIO [note: this is what QEMU qdisk is doing] , [..]
it is direct IO and both READS and WRITES will be considered SYNC
and will go in a single queue and no choking of WRITES will take place."

The solution is quite simple, tack on REQ_SYNC (which is
what the WRITE_ODIRECT macro points to) and the numbers go
back up.

Suggested-by: Vivek Goyal <vgoyal@redhat.com
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-04-26 16:24:18 -04:00
..
aoe drivers/block/aoe/Makefile: replace the use of <module>-objs with <module>-y 2011-01-19 08:25:02 -07:00
drbd Fix common misspellings 2011-03-31 11:26:23 -03:00
paride paride: Convert to bdops->check_events() 2011-03-09 19:54:28 +01:00
xen-blkback xen/blkback: Stick REQ_SYNC on WRITEs to deal with CFQ I/O scheduler. 2011-04-26 16:24:18 -04:00
DAC960.c Fix common misspellings 2011-03-31 11:26:23 -03:00
DAC960.h
Kconfig xen/blkback: Move it from drivers/xen to drivers/block 2011-04-18 14:30:26 -04:00
Makefile xen/blkback: Move it from drivers/xen to drivers/block 2011-04-18 14:30:26 -04:00
amiflop.c Merge branch 'for-2.6.39/core' of git://git.kernel.dk/linux-2.6-block 2011-03-24 10:16:26 -07:00
ataflop.c floppy,{ami|ata}flop: Convert to bdops->check_events() 2011-03-09 19:54:27 +01:00
brd.c Merge branch 'for-2.6.37/barrier' of git://git.kernel.dk/linux-2.6-block 2010-10-22 17:07:18 -07:00
cciss.c cciss: fix missed command status value CMD_UNABORTABLE 2011-03-12 10:02:30 +01:00
cciss.h cciss: fix lost command issue 2011-03-23 20:47:11 +01:00
cciss_cmd.h cciss: Inform controller we are using 32-bit tags. 2011-03-12 10:02:16 +01:00
cciss_scsi.c Revert "cciss: Add missing allocation in scsi_cmd_stack_setup and corresponding deallocation" 2011-03-12 13:47:51 +01:00
cciss_scsi.h cciss: remove C99-style comments 2010-02-22 13:44:45 +01:00
cpqarray.c block: remove per-queue plugging 2011-03-10 08:52:07 +01:00
cpqarray.h
cryptoloop.c
floppy.c Merge branch 'for-2.6.39/stack-plug' into for-2.6.39/core 2011-03-10 08:58:35 +01:00
hd.c Fix common misspellings 2011-03-31 11:26:23 -03:00
ida_cmd.h
ida_ioctl.h
loop.c Merge branch 'for-2.6.39/stack-plug' into for-2.6.39/core 2011-03-10 08:58:35 +01:00
mg_disk.c block: switch s390 tape_block and mg_disk to elevator_change() 2010-08-23 14:02:44 +02:00
nbd.c nbd: remove module-level ioctl mutex 2011-02-11 16:12:20 -08:00
osdblk.c block: remove spurious uses of REQ_HARDBARRIER 2010-09-10 12:35:36 +02:00
pktcdvd.c Merge branch 'for-2.6.39/stack-plug' into for-2.6.39/core 2011-03-10 08:58:35 +01:00
ps3disk.c Merge branch 'for-2.6.37/barrier' of git://git.kernel.dk/linux-2.6-block 2010-10-22 17:07:18 -07:00
ps3vram.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
rbd.c rbd: use watch/notify for changes in rbd header 2011-03-22 11:33:56 -07:00
rbd_types.h rbd: introduce rados block device (rbd), based on libceph 2010-10-20 15:38:13 -07:00
smart1,2.h fix typos 'comamnd' -> 'command' in comments 2011-02-02 11:31:21 +01:00
sunvdc.c block: Consolidate phys_segment and hw_segment limits 2010-02-26 13:58:08 +01:00
swim.c swim[3]: Convert to bdops->check_events() 2011-03-09 19:54:28 +01:00
swim3.c swim[3]: Convert to bdops->check_events() 2011-03-09 19:54:28 +01:00
swim_asm.S
sx8.c block: Consolidate phys_segment and hw_segment limits 2010-02-26 13:58:08 +01:00
ub.c ub: Convert to bdops->check_events() 2011-03-09 19:54:28 +01:00
umem.c Merge branch 'for-2.6.39/stack-plug' into for-2.6.39/core 2011-03-10 08:58:35 +01:00
umem.h
viodasd.c Fix common misspellings 2011-03-31 11:26:23 -03:00
virtio_blk.c Merge branch 'for-2.6.37/barrier' of git://git.kernel.dk/linux-2.6-block 2010-10-22 17:07:18 -07:00
xd.c block: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:10 +02:00
xd.h
xen-blkfront.c Merge branch 'for-linus' of git://xenbits.xen.org/people/sstabellini/linux-pvhvm 2011-03-15 10:59:09 -07:00
xsysace.c Fix common misspellings 2011-03-31 11:26:23 -03:00
z2ram.c drivers/block/z2ram.c: correct printing of sector_t 2010-10-28 06:15:26 -06:00