[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 16/42] virtio-blk: add a knob to disable request merg
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 16/42] virtio-blk: add a knob to disable request merging |
Date: |
Fri, 6 Feb 2015 17:40:23 +0100 |
From: Peter Lieven <address@hidden>
this adds a knob to disable request merging for debugging or benchmarks if
dedired.
Signed-off-by: Peter Lieven <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
hw/block/virtio-blk.c | 5 ++++-
include/hw/virtio/virtio-blk.h | 1 +
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index d0a01a8..8c51a29 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -531,7 +531,8 @@ void virtio_blk_handle_request(VirtIOBlockReq *req,
MultiReqBuffer *mrb)
/* merge would exceed maximum number of requests or IO direction
* changes */
if (mrb->num_reqs > 0 && (mrb->num_reqs == VIRTIO_BLK_MAX_MERGE_REQS ||
- is_write != mrb->is_write)) {
+ is_write != mrb->is_write ||
+ !req->dev->conf.request_merging)) {
virtio_blk_submit_multireq(req->dev->blk, mrb);
}
@@ -950,6 +951,8 @@ static Property virtio_blk_properties[] = {
#ifdef __linux__
DEFINE_PROP_BIT("scsi", VirtIOBlock, conf.scsi, 0, true),
#endif
+ DEFINE_PROP_BIT("request-merging", VirtIOBlock, conf.request_merging, 0,
+ true),
DEFINE_PROP_BIT("x-data-plane", VirtIOBlock, conf.data_plane, 0, false),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/include/hw/virtio/virtio-blk.h b/include/hw/virtio/virtio-blk.h
index 2027a64..fc7d311 100644
--- a/include/hw/virtio/virtio-blk.h
+++ b/include/hw/virtio/virtio-blk.h
@@ -113,6 +113,7 @@ struct VirtIOBlkConf
uint32_t scsi;
uint32_t config_wce;
uint32_t data_plane;
+ uint32_t request_merging;
};
struct VirtIOBlockDataPlane;
--
1.8.3.1
- [Qemu-devel] [PULL 09/42] block: change default for discard and write zeroes to INT_MAX, (continued)
- [Qemu-devel] [PULL 09/42] block: change default for discard and write zeroes to INT_MAX, Kevin Wolf, 2015/02/06
- [Qemu-devel] [PULL 08/42] block: use fallocate(FALLOC_FL_PUNCH_HOLE) & fallocate(0) to write zeroes, Kevin Wolf, 2015/02/06
- [Qemu-devel] [PULL 13/42] hw/virtio-blk: add a constant for max number of merged requests, Kevin Wolf, 2015/02/06
- [Qemu-devel] [PULL 11/42] qed: Really remove unused field QEDAIOCB.finished, Kevin Wolf, 2015/02/06
- [Qemu-devel] [PULL 12/42] block: add accounting for merged requests, Kevin Wolf, 2015/02/06
- [Qemu-devel] [PULL 14/42] block-backend: expose bs->bl.max_transfer_length, Kevin Wolf, 2015/02/06
- [Qemu-devel] [PULL 17/42] qemu-iotests: Fix supported_oses check, Kevin Wolf, 2015/02/06
- [Qemu-devel] [PULL 15/42] virtio-blk: introduce multiread, Kevin Wolf, 2015/02/06
- [Qemu-devel] [PULL 18/42] iotests: Specify format for qemu-nbd, Kevin Wolf, 2015/02/06
- [Qemu-devel] [PULL 20/42] block/dmg: properly detect the UDIF trailer, Kevin Wolf, 2015/02/06
- [Qemu-devel] [PULL 16/42] virtio-blk: add a knob to disable request merging,
Kevin Wolf <=
- [Qemu-devel] [PULL 22/42] block/dmg: extract processing of resource forks, Kevin Wolf, 2015/02/06
- [Qemu-devel] [PULL 25/42] block/dmg: process XML plists, Kevin Wolf, 2015/02/06
- [Qemu-devel] [PULL 19/42] block: add event when disk usage exceeds threshold, Kevin Wolf, 2015/02/06
- [Qemu-devel] [PULL 26/42] block/dmg: set virtual size to a non-zero value, Kevin Wolf, 2015/02/06
- [Qemu-devel] [PULL 21/42] block/dmg: extract mish block decoding functionality, Kevin Wolf, 2015/02/06
- [Qemu-devel] [PULL 29/42] block/dmg: factor out block type check, Kevin Wolf, 2015/02/06
- [Qemu-devel] [PULL 24/42] block/dmg: validate chunk size to avoid overflow, Kevin Wolf, 2015/02/06
- [Qemu-devel] [PULL 23/42] block/dmg: process a buffer instead of reading ints, Kevin Wolf, 2015/02/06
- [Qemu-devel] [PULL 27/42] block/dmg: fix sector data offset calculation, Kevin Wolf, 2015/02/06
- [Qemu-devel] [PULL 28/42] block/dmg: use SectorNumber from BLKX header, Kevin Wolf, 2015/02/06