[prev in list] [next in list] [prev in thread] [next in thread]
List: qemu-commits
Subject: [Qemu-commits] [qemu/qemu] 6fccbb: throttle-groups: fix hang when group member leaves
From: GitHub <noreply () github ! com>
Date: 2018-07-19 15:26:12
Message-ID: 5b50ad94790ca_74b32b080de87c14359f6 () hookshot-fe-6e9b612 ! cp1-iad ! github ! net ! mail
[Download RAW message or body]
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 6fccbb475bc6effc313ee9481726a1748b6dae57
https://github.com/qemu/qemu/commit/6fccbb475bc6effc313ee9481726a1748b6dae57
Author: Stefan Hajnoczi <stefanha@redhat.com>
Date: 2018-07-19 (Thu, 19 Jul 2018)
Changed paths:
M block/throttle-groups.c
Log Message:
-----------
throttle-groups: fix hang when group member leaves
Throttle groups consist of members sharing one throttling state
(including bps/iops limits). Round-robin scheduling is used to ensure
fairness. If a group member already has a timer pending then other
groups members do not schedule their own timers. The next group member
will have its turn when the existing timer expires.
A hang may occur when a group member leaves while it had a timer
scheduled. Although the code carefully removes the group member from
the round-robin list, it does not schedule the next member. Therefore
remaining members continue to wait for the removed member's timer to
expire.
This patch schedules the next request if a timer is pending.
Unfortunately the actual bug is a race condition that I've been unable
to capture in a test case.
Sometimes drive2 hangs when drive1 is removed from the throttling group:
$ qemu ... -drive if=none,id=drive1,cache=none,format=qcow2,file=data1.qcow2,iops=100,group=foo \
\
-device virtio-blk-pci,id=virtio-blk-pci0,drive=drive1 \
-drive if=none,id=drive2,cache=none,format=qcow2,file=data2.qcow2,iops=10,group=foo \
\
-device virtio-blk-pci,id=virtio-blk-pci1,drive=drive2
(guest-console1)# fio -filename /dev/vda 4k-seq-read.job
(guest-console2)# fio -filename /dev/vdb 4k-seq-read.job
(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}}
Reported-by: Nini Gu <ngu@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20180704145410.794-1-stefanha@redhat.com
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1535914
Cc: Alberto Garcia <berto@igalia.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Commit: e1ea55668ffe6ce558a063f3a9621b761738e1f2
https://github.com/qemu/qemu/commit/e1ea55668ffe6ce558a063f3a9621b761738e1f2
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2018-07-19 (Thu, 19 Jul 2018)
Changed paths:
M block/throttle-groups.c
Log Message:
-----------
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into \
staging
Pull request
This fix prevents hangs when a drive leaves a throttling group.
# gpg: Signature made Thu 19 Jul 2018 15:28:37 BST
# gpg: using RSA key 9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8
* remotes/stefanha/tags/block-pull-request:
throttle-groups: fix hang when group member leaves
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Compare: https://github.com/qemu/qemu/compare/771eab934943...e1ea55668ffe
**NOTE:** This service been marked for deprecation: \
https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic