diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-06-04 18:34:04 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-06-04 18:34:04 +0100 |
commit | 0d514fa23402ab7b4f1c965e0631d953bbe4d3b7 (patch) | |
tree | 15694d41fba306b5b8e545d9a6e15bb199c64b25 /util | |
parent | 5d7ad3ce103af3ab7c860a4ca97653f8ffa6e29c (diff) | |
parent | 21891a5a3011608845b5d7f1f9cce60cdc2bcc62 (diff) |
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Pull request
* Copy offloading for qemu-img convert (iSCSI, raw, and qcow2)
If the underlying storage supports copy offloading, qemu-img convert will
use it instead of performing reads and writes. This avoids data transfers
and thus frees up storage bandwidth for other purposes. SCSI EXTENDED COPY
and Linux copy_file_range(2) are used to implement this optimization.
* Drop spurious "WARNING: I\/O thread spun for 1000 iterations" warning
# gpg: Signature made Mon 04 Jun 2018 12:20:08 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:
main-loop: drop spin_counter
qemu-img: Convert with copy offloading
block-backend: Add blk_co_copy_range
iscsi: Implement copy offloading
iscsi: Create and use iscsi_co_wait_for_task
iscsi: Query and save device designator when opening
file-posix: Implement bdrv_co_copy_range
qcow2: Implement copy offloading
raw: Implement copy offloading
raw: Check byte range uniformly
block: Introduce API for copy offloading
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/main-loop.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/util/main-loop.c b/util/main-loop.c index 992f9b0f34..affe0403c5 100644 --- a/util/main-loop.c +++ b/util/main-loop.c @@ -222,36 +222,11 @@ static int os_host_main_loop_wait(int64_t timeout) { GMainContext *context = g_main_context_default(); int ret; - static int spin_counter; g_main_context_acquire(context); glib_pollfds_fill(&timeout); - /* If the I/O thread is very busy or we are incorrectly busy waiting in - * the I/O thread, this can lead to starvation of the BQL such that the - * VCPU threads never run. To make sure we can detect the later case, - * print a message to the screen. If we run into this condition, create - * a fake timeout in order to give the VCPU threads a chance to run. - */ - if (!timeout && (spin_counter > MAX_MAIN_LOOP_SPIN)) { - static bool notified; - - if (!notified && !qtest_enabled() && !qtest_driver()) { - warn_report("I/O thread spun for %d iterations", - MAX_MAIN_LOOP_SPIN); - notified = true; - } - - timeout = SCALE_MS; - } - - - if (timeout) { - spin_counter = 0; - } else { - spin_counter++; - } qemu_mutex_unlock_iothread(); replay_mutex_unlock(); |