1
The following changes since commit 940a8ce075e3408742a4edcabfd6c2a15e2539eb:
1
The following changes since commit ea6abffa8a08d832feb759d359d5b935e3087cf7:
2
2
3
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2017-03-20 16:34:26 +0000)
3
Update version for v3.0.0-rc1 release (2018-07-17 18:15:19 +0100)
4
4
5
are available in the git repository at:
5
are available in the Git repository at:
6
6
7
git://github.com/stefanha/qemu.git tags/block-pull-request
7
git://github.com/stefanha/qemu.git tags/block-pull-request
8
8
9
for you to fetch changes up to ff5bbe56c6f9a74c2d77389a21d5d2368458c939:
9
for you to fetch changes up to 6fccbb475bc6effc313ee9481726a1748b6dae57:
10
10
11
parallels: fix default options parsing (2017-03-21 10:02:36 +0000)
11
throttle-groups: fix hang when group member leaves (2018-07-19 13:08:26 +0100)
12
13
----------------------------------------------------------------
14
Pull request
15
16
This fix prevents hangs when a drive leaves a throttling group.
12
17
13
----------------------------------------------------------------
18
----------------------------------------------------------------
14
19
15
----------------------------------------------------------------
20
Stefan Hajnoczi (1):
21
throttle-groups: fix hang when group member leaves
16
22
17
Edgar Kaziahmedov (1):
23
block/throttle-groups.c | 4 ++++
18
parallels: fix default options parsing
24
1 file changed, 4 insertions(+)
19
20
block/parallels.c | 2 +-
21
1 file changed, 1 insertion(+), 1 deletion(-)
22
25
23
--
26
--
24
2.9.3
27
2.17.1
25
28
26
29
diff view generated by jsdifflib
1
From: Edgar Kaziahmedov <edos@virtuozzo.mipt.ru>
1
Throttle groups consist of members sharing one throttling state
2
(including bps/iops limits). Round-robin scheduling is used to ensure
3
fairness. If a group member already has a timer pending then other
4
groups members do not schedule their own timers. The next group member
5
will have its turn when the existing timer expires.
2
6
3
parallels block driver is completely broken since commit
7
A hang may occur when a group member leaves while it had a timer
4
commit 75cdcd1553e74b5edc58aed23e3b2da8dabb1876
8
scheduled. Although the code carefully removes the group member from
5
Author: Markus Armbruster <armbru@redhat.com>
9
the round-robin list, it does not schedule the next member. Therefore
6
Date: Tue Feb 21 21:14:08 2017 +0100
10
remaining members continue to wait for the removed member's timer to
7
option: Fix checking of sizes for overflow and trailing crap
11
expire.
8
Right now even simple
9
qemu-io -c "read 512 64k" 1.hds
10
ends up with
11
Unexpected error in parse_option_size() at util/qemu-option.c:188:
12
Parameter 'prealloc-size' expects a non-negative number below 2^64
13
Aborted (core dumped)
14
The cure is simple - we should use 'M' as a suffix in default option value
15
instead of 'MiB'.
16
12
17
Signed-off-by: Edgar Kaziahmedov <edos@virtuozzo.mipt.ru>
13
This patch schedules the next request if a timer is pending.
18
Signed-off-by: Denis V. Lunev <den@openvz.org>
14
Unfortunately the actual bug is a race condition that I've been unable
19
Message-id: 1490002022-22653-1-git-send-email-den@openvz.org
15
to capture in a test case.
20
CC: Markus Armbruster <armbru@redhat.com>
16
21
CC: Stefan Hajnoczi <stefanha@redhat.com>
17
Sometimes drive2 hangs when drive1 is removed from the throttling group:
18
19
$ qemu ... -drive if=none,id=drive1,cache=none,format=qcow2,file=data1.qcow2,iops=100,group=foo \
20
-device virtio-blk-pci,id=virtio-blk-pci0,drive=drive1 \
21
-drive if=none,id=drive2,cache=none,format=qcow2,file=data2.qcow2,iops=10,group=foo \
22
-device virtio-blk-pci,id=virtio-blk-pci1,drive=drive2
23
(guest-console1)# fio -filename /dev/vda 4k-seq-read.job
24
(guest-console2)# fio -filename /dev/vdb 4k-seq-read.job
25
(qmp) {"execute": "block_set_io_throttle", "arguments": {"device": "drive1","bps": 0,"bps_rd": 0,"bps_wr": 0,"iops": 0,"iops_rd": 0,"iops_wr": 0}}
26
27
Reported-by: Nini Gu <ngu@redhat.com>
28
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
29
Message-id: 20180704145410.794-1-stefanha@redhat.com
30
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1535914
31
Cc: Alberto Garcia <berto@igalia.com>
22
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
32
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
23
---
33
---
24
block/parallels.c | 2 +-
34
block/throttle-groups.c | 4 ++++
25
1 file changed, 1 insertion(+), 1 deletion(-)
35
1 file changed, 4 insertions(+)
26
36
27
diff --git a/block/parallels.c b/block/parallels.c
37
diff --git a/block/throttle-groups.c b/block/throttle-groups.c
28
index XXXXXXX..XXXXXXX 100644
38
index XXXXXXX..XXXXXXX 100644
29
--- a/block/parallels.c
39
--- a/block/throttle-groups.c
30
+++ b/block/parallels.c
40
+++ b/block/throttle-groups.c
31
@@ -XXX,XX +XXX,XX @@ static QemuOptsList parallels_runtime_opts = {
41
@@ -XXX,XX +XXX,XX @@ void throttle_group_unregister_tgm(ThrottleGroupMember *tgm)
32
.name = PARALLELS_OPT_PREALLOC_SIZE,
42
33
.type = QEMU_OPT_SIZE,
43
qemu_mutex_lock(&tg->lock);
34
.help = "Preallocation size on image expansion",
44
for (i = 0; i < 2; i++) {
35
- .def_value_str = "128MiB",
45
+ if (timer_pending(tgm->throttle_timers.timers[i])) {
36
+ .def_value_str = "128M",
46
+ tg->any_timer_armed[i] = false;
37
},
47
+ schedule_next_request(tgm, i);
38
{
48
+ }
39
.name = PARALLELS_OPT_PREALLOC_MODE,
49
if (tg->tokens[i] == tgm) {
50
token = throttle_group_next_tgm(tgm);
51
/* Take care of the case where this is the last tgm in the group */
40
--
52
--
41
2.9.3
53
2.17.1
42
54
43
55
diff view generated by jsdifflib