[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 24/34] qapi: Add burst length fields to BlockDeviceIn
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 24/34] qapi: Add burst length fields to BlockDeviceInfo |
Date: |
Mon, 22 Feb 2016 17:32:42 +0100 |
From: Alberto Garcia <address@hidden>
This patch adds the new bps_*_max_length and iops_*_max_length
parameters to the BlockDeviceInfo struct.
Signed-off-by: Alberto Garcia <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/qapi.c | 20 ++++++++++++++++++++
qapi/block-core.json | 39 +++++++++++++++++++++++++++++++++------
2 files changed, 53 insertions(+), 6 deletions(-)
diff --git a/block/qapi.c b/block/qapi.c
index 67891b7..db2d3fb 100644
--- a/block/qapi.c
+++ b/block/qapi.c
@@ -92,6 +92,26 @@ BlockDeviceInfo *bdrv_block_device_info(BlockDriverState
*bs, Error **errp)
info->has_iops_wr_max = cfg.buckets[THROTTLE_OPS_WRITE].max;
info->iops_wr_max = cfg.buckets[THROTTLE_OPS_WRITE].max;
+ info->has_bps_max_length = info->has_bps_max;
+ info->bps_max_length =
+ cfg.buckets[THROTTLE_BPS_TOTAL].burst_length;
+ info->has_bps_rd_max_length = info->has_bps_rd_max;
+ info->bps_rd_max_length =
+ cfg.buckets[THROTTLE_BPS_READ].burst_length;
+ info->has_bps_wr_max_length = info->has_bps_wr_max;
+ info->bps_wr_max_length =
+ cfg.buckets[THROTTLE_BPS_WRITE].burst_length;
+
+ info->has_iops_max_length = info->has_iops_max;
+ info->iops_max_length =
+ cfg.buckets[THROTTLE_OPS_TOTAL].burst_length;
+ info->has_iops_rd_max_length = info->has_iops_rd_max;
+ info->iops_rd_max_length =
+ cfg.buckets[THROTTLE_OPS_READ].burst_length;
+ info->has_iops_wr_max_length = info->has_iops_wr_max;
+ info->iops_wr_max_length =
+ cfg.buckets[THROTTLE_OPS_WRITE].burst_length;
+
info->has_iops_size = cfg.op_size;
info->iops_size = cfg.op_size;
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 126d834..fbbc709 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -273,17 +273,41 @@
#
# @image: the info of image used (since: 1.6)
#
-# @bps_max: #optional total max in bytes (Since 1.7)
+# @bps_max: #optional total throughput limit during bursts,
+# in bytes (Since 1.7)
#
-# @bps_rd_max: #optional read max in bytes (Since 1.7)
+# @bps_rd_max: #optional read throughput limit during bursts,
+# in bytes (Since 1.7)
+#
+# @bps_wr_max: #optional write throughput limit during bursts,
+# in bytes (Since 1.7)
#
-# @bps_wr_max: #optional write max in bytes (Since 1.7)
+# @iops_max: #optional total I/O operations per second during bursts,
+# in bytes (Since 1.7)
#
-# @iops_max: #optional total I/O operations max (Since 1.7)
+# @iops_rd_max: #optional read I/O operations per second during bursts,
+# in bytes (Since 1.7)
#
-# @iops_rd_max: #optional read I/O operations max (Since 1.7)
+# @iops_wr_max: #optional write I/O operations per second during bursts,
+# in bytes (Since 1.7)
#
-# @iops_wr_max: #optional write I/O operations max (Since 1.7)
+# @bps_max_length: #optional maximum length of the @bps_max burst
+# period, in seconds. (Since 2.6)
+#
+# @bps_rd_max_length: #optional maximum length of the @bps_rd_max
+# burst period, in seconds. (Since 2.6)
+#
+# @bps_wr_max_length: #optional maximum length of the @bps_wr_max
+# burst period, in seconds. (Since 2.6)
+#
+# @iops_max_length: #optional maximum length of the @iops burst
+# period, in seconds. (Since 2.6)
+#
+# @iops_rd_max_length: #optional maximum length of the @iops_rd_max
+# burst period, in seconds. (Since 2.6)
+#
+# @iops_wr_max_length: #optional maximum length of the @iops_wr_max
+# burst period, in seconds. (Since 2.6)
#
# @iops_size: #optional an I/O size in bytes (Since 1.7)
#
@@ -308,6 +332,9 @@
'*bps_max': 'int', '*bps_rd_max': 'int',
'*bps_wr_max': 'int', '*iops_max': 'int',
'*iops_rd_max': 'int', '*iops_wr_max': 'int',
+ '*bps_max_length': 'int', '*bps_rd_max_length': 'int',
+ '*bps_wr_max_length': 'int', '*iops_max_length': 'int',
+ '*iops_rd_max_length': 'int', '*iops_wr_max_length': 'int',
'*iops_size': 'int', '*group': 'str', 'cache': 'BlockdevCacheInfo',
'write_threshold': 'int' } }
--
1.8.3.1
- [Qemu-devel] [PULL 14/34] throttle: Make throttle_compute_timer() static, (continued)
- [Qemu-devel] [PULL 14/34] throttle: Make throttle_compute_timer() static, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 05/34] qemu-io: add support for --object command line arg, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 08/34] qemu-nbd: allow specifying image as a set of options args, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 18/34] throttle: Set always an average value when setting a maximum value, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 11/34] qemu-nbd: use no_argument/required_argument constants, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 26/34] throttle: Test throttle_compute_wait() during bursts, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 17/34] throttle: Make throttle_is_valid() set errp, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 20/34] throttle: Use throttle_config_init() to initialize ThrottleConfig, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 22/34] throttle: Add command-line settings to define the burst periods, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 33/34] qemu-iotests: 140: don't use IDE device, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 24/34] qapi: Add burst length fields to BlockDeviceInfo,
Kevin Wolf <=
- [Qemu-devel] [PULL 19/34] throttle: Merge all functions that check the configuration into one, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 25/34] throttle: Check that burst_level leaks correctly, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 30/34] MAINTAINERS: Add myself as maintainer of the throttling code, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 21/34] throttle: Add support for burst periods, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 23/34] qapi: Add burst length parameters to block_set_io_throttle, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 27/34] qemu-iotests: Extend iotest 093 to test bursts, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 31/34] blockdev: unset inappropriate flags when changing medium, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 32/34] qemu-iotests: 067: ignore QMP events, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 29/34] docs: Document the throttling infrastructure, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 34/34] qemu-iotests: 140: make description slightly more verbose, Kevin Wolf, 2016/02/22