From 76f4afb40fa076ed23fe0ab42c7a768ddb71123f Mon Sep 17 00:00:00 2001 From: Alberto Garcia Date: Mon, 8 Jun 2015 18:17:44 +0200 Subject: throttle: Add throttle group support The throttle group support use a cooperative round robin scheduling algorithm. The principles of the algorithm are simple: - Each BDS of the group is used as a token in a circular way. - The active BDS computes if a wait must be done and arms the right timer. - If a wait must be done the token timer will be armed so the token will become the next active BDS. Signed-off-by: Alberto Garcia Reviewed-by: Stefan Hajnoczi Message-id: f0082a86f3ac01c46170f7eafe2101a92e8fde39.1433779731.git.berto@igalia.com Signed-off-by: Stefan Hajnoczi --- hmp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hmp.c') diff --git a/hmp.c b/hmp.c index 514f22f..eb5ef61 100644 --- a/hmp.c +++ b/hmp.c @@ -1356,7 +1356,9 @@ void hmp_block_set_io_throttle(Monitor *mon, const QDict *qdict) false, 0, false, /* No default I/O size */ - 0, &err); + 0, + false, + NULL, &err); hmp_handle_error(mon, &err); } -- cgit v1.1 From b8fe1694e506362706cde65d1bf55b23e62b150e Mon Sep 17 00:00:00 2001 From: Alberto Garcia Date: Mon, 8 Jun 2015 18:17:46 +0200 Subject: throttle: add the name of the ThrottleGroup to BlockDeviceInfo Signed-off-by: Alberto Garcia Reviewed-by: Stefan Hajnoczi Message-id: 172df91f09c69c6f0440a697bbd1b3f95b077ee4.1433779731.git.berto@igalia.com Signed-off-by: Stefan Hajnoczi --- hmp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'hmp.c') diff --git a/hmp.c b/hmp.c index eb5ef61..8fac44a 100644 --- a/hmp.c +++ b/hmp.c @@ -399,7 +399,8 @@ static void print_block_info(Monitor *mon, BlockInfo *info, " iops_max=%" PRId64 " iops_rd_max=%" PRId64 " iops_wr_max=%" PRId64 - " iops_size=%" PRId64 "\n", + " iops_size=%" PRId64 + " group=%s\n", inserted->bps, inserted->bps_rd, inserted->bps_wr, @@ -412,7 +413,8 @@ static void print_block_info(Monitor *mon, BlockInfo *info, inserted->iops_max, inserted->iops_rd_max, inserted->iops_wr_max, - inserted->iops_size); + inserted->iops_size, + inserted->group); } if (verbose) { -- cgit v1.1