- Mar 08, 2016
-
-
Dr. David Alan Gilbert authored
I'd missed the sync count off in the postcopy case. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
zhanghailiang <zhang.zhanghailiang@huawei.com> Message-id: 1456394631-18010-1-git-send-email-dgilbert@redhat.com Message-Id: <1456394631-18010-1-git-send-email-dgilbert@redhat.com> Signed-off-by:
Amit Shah <amit.shah@redhat.com>
-
- Feb 28, 2016
-
-
Greg Kurz authored
Migration of pseries-2.3 doesn't have configuration section. Unfortunately, QEMU 2.4/2.4.1/2.5 are buggy and always stream and expect the configuration section, and break migration both ways. This patch introduces a property which allows to enforce a configuration section for machines who don't have one. It can be set at startup: -machine enforce-config-section=on or later from the QEMU monitor: qom-set /machine enforce-config-section on It is up to the tooling to set or unset this property according to the version of the QEMU at the other end of the pipe. Signed-off-by:
Greg Kurz <gkurz@linux.vnet.ibm.com> Reviewed-by:
Laurent Vivier <lvivier@redhat.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
- Feb 26, 2016
-
-
Denis V. Lunev authored
There is a possibility to hit an assert in qcow2_get_specific_info that s->qcow_version is undefined. This happens when VM in starting from suspended state, i.e. it processes incoming migration, and in the same time 'info block' is called. The problem is that qcow2_invalidate_cache() closes the image and memset()s BDRVQcowState in the middle. The patch moves processing of bdrv_invalidate_cache_all out of coroutine context for postcopy migration to avoid that. This function is called with the following stack: process_incoming_migration_co qemu_loadvm_state qemu_loadvm_state_main loadvm_process_command loadvm_postcopy_handle_run Signed-off-by:
Denis V. Lunev <den@openvz.org> Tested-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Fam Zheng <famz@redhat.com> CC: Paolo Bonzini <pbonzini@redhat.com> CC: Juan Quintela <quintela@redhat.com> CC: Amit Shah <amit.shah@redhat.com> Message-Id: <1456304019-10507-3-git-send-email-den@openvz.org> Signed-off-by:
Amit Shah <amit.shah@redhat.com>
-
Denis V. Lunev authored
There is a possibility to hit an assert in qcow2_get_specific_info that s->qcow_version is undefined. This happens when VM in starting from suspended state, i.e. it processes incoming migration, and in the same time 'info block' is called. The problem is that qcow2_invalidate_cache() closes the image and memset()s BDRVQcowState in the middle. The patch moves processing of bdrv_invalidate_cache_all out of coroutine context for standard migration to avoid that. Signed-off-by:
Denis V. Lunev <den@openvz.org> Reviewed-by:
Fam Zheng <famz@redhat.com> CC: Paolo Bonzini <pbonzini@redhat.com> CC: Juan Quintela <quintela@redhat.com> CC: Amit Shah <amit.shah@redhat.com> Message-Id: <1456304019-10507-2-git-send-email-den@openvz.org> [Amit: Fix a use-after-free bug] Signed-off-by:
Amit Shah <amit.shah@redhat.com>
-
Matthew Fortune authored
sys/eventfd.h was being guarded only by a check for linux but does not exist on older distributions like CentOS 5. Move the include into the code that uses it and add an appropriate guard. Signed-off-by:
Matthew Fortune <matthew.fortune@imgtec.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Message-Id: <6D39441BF12EF246A7ABCE6654B023536BB85DEB@hhmail02.hh.imgtec.org> Signed-off-by:
Amit Shah <amit.shah@redhat.com>
-
Wei Yang authored
In qemu_savevm_state_complete_precopy(), it iterates on each device to add a json object and transfer related status to destination, while the order of the last two steps could be refined. Current order: json_start_object() save_section_header() vmstate_save() json_end_object() save_section_footer() After the change: json_start_object() save_section_header() vmstate_save() save_section_footer() json_end_object() This patch reorder the code to to make it symmetric. No functional change. Signed-off-by:
Wei Yang <richard.weiyang@gmail.com> Reviewed-by:
Amit Shah <amit.shah@redhat.com> Message-Id: <1454626230-16334-1-git-send-email-richard.weiyang@gmail.com> Signed-off-by:
Amit Shah <amit.shah@redhat.com>
-
- Feb 25, 2016
-
-
Paolo Bonzini authored
This is needed because dataplane will run during block migration as well. The block device migration code is quite liberal in taking the iothread mutex. For simplicity, keep it the same way, even though one could actually choose between the BQL (for regular BlockDriverStates) and the AioContext (for dataplane BlockDriverStates). When the block layer is made fully thread safe, aio_context_acquire shall go away altogether. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Acked-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Fam Zheng <famz@redhat.com>
-
- Feb 23, 2016
-
-
Dr. David Alan Gilbert authored
Spice hooks the migration status changes to figure out when to transmit information to the new spice server; but the migration status in postcopy doesn't quite fit - the destination starts running before the end of the source migration. It's not a case of hanging off the migration status change to postcopy-active either, since that happens before we stop the guest CPU. Fix it by sending a notify just after sending the device state, and adding a flag that can be tested by the notify receiver. Symptom: spice handover doesn't work with the error: red_worker.c:11540:display_channel_wait_for_migrate_data: timeout Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Amit Shah <amit.shah@redhat.com> Message-id: 1456161452-25318-1-git-send-email-dgilbert@redhat.com Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
- Feb 22, 2016
-
-
Kevin Wolf authored
When using 'migrate -b', we must make sure to take ownership of the image before writing to it. Otherwise metadata would be thrown away on migration completion; this was caught by the assertions introduced in commit 09e0c771. Reported-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- Feb 16, 2016
-
-
Paolo Bonzini authored
This can cause various segmentation faults or aborts in qemu-iotests test 091. Fixes: 5b82b703 Cc: Dave Gilbert <dgilbert@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Feb 11, 2016
-
-
Wei Yang authored
Within the if statement, time_spent is assured to be non-zero. This patch just removes the check on time_spent when calculating mbs. Signed-off-by:
Wei Yang <richard.weiyang@gmail.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- Feb 09, 2016
-
-
Stefan Hajnoczi authored
Although accesses to ram_list.dirty_memory[] use atomics so multiple threads can safely dirty the bitmap, the data structure is not fully thread-safe yet. This patch handles the RAM hotplug case where ram_list.dirty_memory[] is grown. ram_list.dirty_memory[] is change from a regular bitmap to an RCU array of pointers to fixed-size bitmap blocks. Threads can continue accessing bitmap blocks while the array is being extended. See the comments in the code for an in-depth explanation of struct DirtyMemoryBlocks. I have tested that live migration with virtio-blk dataplane works. Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <1453728801-5398-2-git-send-email-stefanha@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Feb 05, 2016
-
-
Greg Kurz authored
state->name does not contain a terminating '\0' and you may get: Machine type received is 'pseries-2.3y�?' and local is 'pseries-2.4' load of migration failed: Invalid argument Let's add a precision modifier to fix this. Reviewed-by:
Amit Shah <amit.shah@redhat.com> Signed-off-by:
Greg Kurz <gkurz@linux.vnet.ibm.com> Message-Id: <20160205083201.2201.76109.stgit@bahia.huguette.org> Signed-off-by:
Amit Shah <amit.shah@redhat.com>
-
Liang Li authored
Since 's->state' will be set in migrate_init(), there is no need to set it before calling migrate_init(). The code and the related comments can be removed. Signed-off-by:
Liang Li <liang.z.li@intel.com> Reviewed-by:
Fam Zheng <famz@redhat.com> Reviewed-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Amit Shah <amit.shah@redhat.com> Message-Id: <1453875065-24326-1-git-send-email-liang.z.li@intel.com> Signed-off-by:
Amit Shah <amit.shah@redhat.com>
-
Hailiang Zhang authored
Some helper functions use parameters 'RAMBlock *block' and 'ram_addr_t *offset', We can use 'PageSearchStatus *pss' directly instead, with this change, we can reduce the number of parameters for these helper function, also it is easily to add new parameters for these helper functions. Signed-off-by:
zhanghailiang <zhang.zhanghailiang@huawei.com> Reviewed-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Amit Shah <amit.shah@redhat.com> Message-Id: <1452829066-9764-5-git-send-email-zhang.zhanghailiang@huawei.com> Signed-off-by:
Amit Shah <amit.shah@redhat.com>
-
Hailiang Zhang authored
qemu_loadvm_state is too long, and we can simplify it by splitting up with three helper functions. Signed-off-by:
zhanghailiang <zhang.zhanghailiang@huawei.com> Reviewed-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Amit Shah <amit.shah@redhat.com> Message-Id: <1452829066-9764-4-git-send-email-zhang.zhanghailiang@huawei.com> Signed-off-by:
Amit Shah <amit.shah@redhat.com>
-
Hailiang Zhang authored
Rename the 'file' member of MigrationState to 'to_dst_file' to be consistent with to_src_file, from_src_file and from_dst_file. Signed-off-by:
zhanghailiang <zhang.zhanghailiang@huawei.com> Reviewed-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Amit Shah <amit.shah@redhat.com> Message-Id: <1452829066-9764-3-git-send-email-zhang.zhanghailiang@huawei.com> Signed-off-by:
Amit Shah <amit.shah@redhat.com>
-
Hailiang Zhang authored
Split host_from_stream_offset() into two parts: One is to get ram block, which the block idstr may be get from migration stream, the other is to get hva (host) address from block and the offset. Besides, we will do the check working in a new helper offset_in_ramblock(). Signed-off-by:
zhanghailiang <zhang.zhanghailiang@huawei.com> Reviewed-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Amit Shah <amit.shah@redhat.com> Message-Id: <1452829066-9764-2-git-send-email-zhang.zhanghailiang@huawei.com> Signed-off-by:
Amit Shah <amit.shah@redhat.com>
-
- Jan 29, 2016
-
-
Peter Maydell authored
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Message-id: 1453832250-766-2-git-send-email-peter.maydell@linaro.org
-
- Jan 22, 2016
-
-
Peter Maydell authored
Replace the uint8 softfloat-specific typedef with uint8_t. This change was made with find include hw fpu target-* -name '*.[ch]' | xargs sed -i -e 's/\buint8\b/uint8_t/g' together with manual removal of the typedef definition and manual fixing of more erroneous uses found via test compilation. It turns out that the only code using this type is an accidental use where uint8_t was intended anyway... Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <rth@twiddle.net> Reviewed-by:
Aurelien Jarno <aurelien@aurel32.net> Acked-by:
Leon Alrae <leon.alrae@imgtec.com> Acked-by:
James Hogan <james.hogan@imgtec.com> Message-id: 1452603315-27030-7-git-send-email-peter.maydell@linaro.org
-
- Jan 20, 2016
-
-
Kevin Wolf authored
So far, live migration with shared storage meant that the image is in a not-really-ready don't-touch-me state on the destination while the source is still actively using it, but after completing the migration, the image was fully opened on both sides. This is bad. This patch adds a block driver callback to inactivate images on the source before completing the migration. Inactivation means that it goes to a state as if it was just live migrated to the qemu instance on the source (i.e. BDRV_O_INACTIVE is set). You're then supposed to continue either on the source or on the destination, which takes ownership of the image. A typical migration looks like this now with respect to disk images: 1. Destination qemu is started, the image is opened with BDRV_O_INACTIVE. The image is fully opened on the source. 2. Migration is about to complete. The source flushes the image and inactivates it. Now both sides have the image opened with BDRV_O_INACTIVE and are expecting the other side to still modify it. 3. One side (the destination on success) continues and calls bdrv_invalidate_all() in order to take ownership of the image again. This removes BDRV_O_INACTIVE on the resuming side; the flag remains set on the other side. This ensures that the same image isn't written to by both instances (unless both are resumed, but then you get what you deserve). This is important because .bdrv_close for non-BDRV_O_INACTIVE images could write to the image file, which is definitely forbidden while another host is using the image. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
John Snow <jsnow@redhat.com>
-
- Jan 16, 2016
-
-
Juan Quintela authored
This allows to send a partial array where the size is another structure field multiplied by a constant. Signed-off-by:
Juan Quintela <quintela@redhat.com> [PMM: updated to current master] Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
Juan Quintela authored
Add vmstate support for migrating arrays of CPU_DoubleU via VMSTATE_CPUDOUBLE_ARRAY. Signed-off-by:
Juan Quintela <quintela@redhat.com> [PMM: rebased, since files have all moved since 2012; added VMSTATE_CPUDOUBLE_ARRAY_V for consistency with FLOAT64] Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
- Jan 13, 2016
-
-
Markus Armbruster authored
Commit 6daf194d, be62a2eb and 312fd5f2 got rid of a bunch, but they keep coming back. Tracked down with the Coccinelle semantic patch from commit 312fd5f2. Cc: Fam Zheng <famz@redhat.com> Cc: Peter Crosthwaite <crosthwaitepeter@gmail.com> Cc: Bharata B Rao <bharata@linux.vnet.ibm.com> Cc: Dominik Dingel <dingel@linux.vnet.ibm.com> Cc: David Hildenbrand <dahi@linux.vnet.ibm.com> Cc: Jason J. Herne <jjherne@linux.vnet.ibm.com> Cc: Stefan Berger <stefanb@linux.vnet.ibm.com> Cc: Dr. David Alan Gilbert <dgilbert@redhat.com> Cc: Changchun Ouyang <changchun.ouyang@intel.com> Cc: zhanghailiang <zhang.zhanghailiang@huawei.com> Cc: Pavel Fedin <p.fedin@samsung.com> Signed-off-by:
Markus Armbruster <armbru@pond.sub.org> Reviewed-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Acked-by:
Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by:
Bharata B Rao <bharata@linux.vnet.ibm.com> Acked-by:
Fam Zheng <famz@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-Id: <1450452927-8346-17-git-send-email-armbru@redhat.com>
-
Markus Armbruster authored
Both error_reportf_err() and monitor_printf() print to the same destination when monitor_printf() is used correctly, i.e. within an HMP monitor. Elsewhere, monitor_printf() does nothing, while error_reportf_err() reports to stderr. Both changed functions are HMP command handlers. These should only run within an HMP monitor. Unlike monitor_printf(), error_reportf_err() uses the error whole instead of just its message obtained with error_get_pretty(). This avoids suppressing its hint (see commit 50b7b000), but I don't think the errors touched in this commit can come with hints. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-Id: <1450452927-8346-15-git-send-email-armbru@redhat.com>
-
Markus Armbruster authored
Both error_report_err() and monitor_printf() print to the same destination when monitor_printf() is used correctly, i.e. within an HMP monitor. Elsewhere, monitor_printf() does nothing, while error_report_err() reports to stderr. Most changed functions are HMP command handlers. These should only run within an HMP monitor. The one exception is bdrv_password_cb(), which should also only run within an HMP monitor. Four command handlers prefix the error message with the command name: balloon, migrate_set_capability, migrate_set_parameter, migrate. Pointless, drop. Unlike monitor_printf(), error_report_err() uses the error whole instead of just its message obtained with error_get_pretty(). This avoids suppressing its hint (see commit 50b7b000). Example: (qemu) device_add ivshmem,id=666 Parameter 'id' expects an identifier Identifiers consist of letters, digits, '-', '.', '_', starting with a letter. Try "help device_add" for more information The "Identifiers consist of..." line is new with this patch. Coccinelle semantic patch: @@ expression M, E; @@ - monitor_printf(M, "%s\n", error_get_pretty(E)); - error_free(E); + error_report_err(E); @r1@ expression M, E; format F; position p; @@ - monitor_printf(M, "...%@F@\n", error_get_pretty(E));@p - error_free(E); + error_report_err(E); @script:python@ p << r1.p; @@ print "%s:%s:%s: prefix dropped" % (p[0].file, p[0].line, p[0].column) Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-Id: <1450452927-8346-4-git-send-email-armbru@redhat.com>
-
Dr. David Alan Gilbert authored
qemu_get_buffer does a copy, we can avoid the memcpy, and we can then remove the extra buffer. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Liang Li <liang.z.li@intel.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Amit Shah <amit.shah@redhat.com> Message-Id: <1450266458-3178-7-git-send-email-dgilbert@redhat.com> Signed-off-by:
Amit Shah <amit.shah@redhat.com>
-
Dr. David Alan Gilbert authored
Avoid a data copy (if we're lucky) in the xbzrle code. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Amit Shah <amit.shah@redhat.com> Message-Id: <1450266458-3178-6-git-send-email-dgilbert@redhat.com> Signed-off-by:
Amit Shah <amit.shah@redhat.com>
-
Dr. David Alan Gilbert authored
Emit an event each time we sync the dirty bitmap on the source; this helps libvirt use postcopy by giving it a kick when it might be a good idea to start the postcopy. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Amit Shah <amit.shah@redhat.com> Message-Id: <1450266458-3178-5-git-send-email-dgilbert@redhat.com> Signed-off-by:
Amit Shah <amit.shah@redhat.com>
-
Dr. David Alan Gilbert authored
I missed the calls to send migration events on the destination side as we enter postcopy. Take care when adding them not to do it after state has been freed. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
zhanghailiang <zhang.zhanghailiang@huawei.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Amit Shah <amit.shah@redhat.com> Message-Id: <1450266458-3178-4-git-send-email-dgilbert@redhat.com> Signed-off-by:
Amit Shah <amit.shah@redhat.com>
-
Hailiang Zhang authored
For migration destination, we also need to know its state, we will use it in COLO. Here we add a new member 'state' for MigrationIncomingState, and also use migrate_set_state() to modify its value. Signed-off-by:
zhanghailiang <zhang.zhanghailiang@huawei.com> dgilbert: Fixed early free of MigraitonIncomingState Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Amit Shah <amit.shah@redhat.com> Message-Id: <1450266458-3178-3-git-send-email-dgilbert@redhat.com> Signed-off-by:
Amit Shah <amit.shah@redhat.com>
-
Hailiang Zhang authored
Change the first parameter of migrate_set_state(), and export it. We will use it in a later patch to update incoming state. Signed-off-by:
zhanghailiang <zhang.zhanghailiang@huawei.com> Reviewed-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> dgilbert: Updated comment as per Juan's review Message-Id: <1450266458-3178-2-git-send-email-dgilbert@redhat.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Amit Shah <amit.shah@redhat.com> Signed-off-by:
Amit Shah <amit.shah@redhat.com>
-
- Dec 17, 2015
-
-
Eric Blake authored
Now that we guarantee the user doesn't have any enum values beginning with a single underscore, we can use that for our own purposes. Renaming ENUM_MAX to ENUM__MAX makes it obvious that the sentinel is generated. This patch was mostly generated by applying a temporary patch: |diff --git a/scripts/qapi.py b/scripts/qapi.py |index e6d014b..b862ec9 100644 |--- a/scripts/qapi.py |+++ b/scripts/qapi.py |@@ -1570,6 +1570,7 @@ const char *const %(c_name)s_lookup[] = { | max_index = c_enum_const(name, 'MAX', prefix) | ret += mcgen(''' | [%(max_index)s] = NULL, |+// %(max_index)s | }; | ''', | max_index=max_index) then running: $ cat qapi-{types,event}.c tests/test-qapi-types.c | sed -n 's,^// \(.*\)MAX,s|\1MAX|\1_MAX|g,p' > list $ git grep -l _MAX | xargs sed -i -f list The only things not generated are the changes in scripts/qapi.py. Rejecting enum members named 'MAX' is now useless, and will be dropped in the next patch. Signed-off-by:
Eric Blake <eblake@redhat.com> Message-Id: <1447836791-369-23-git-send-email-eblake@redhat.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> [Rebased to current master, commit message tweaked] Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
- Dec 11, 2015
-
-
Dr. David Alan Gilbert authored
My fix (84e7b80a) replaced the last_sent_block update that I'd removed earlier; however it was too aggressive in the xbzrle case. save_xbzrle_page might return '0' to mean that the page didn't need sending since it was the same as the last sent version; in this case we can't update 'last_sent_block' since we didn't actually send it. Symptom: 'Illegal RAM offset 1018000' as we try and send a page to the wrong RAMBlock; potentially that could be a data corruption if you were really unlucky. Fixes: 84e7b80a Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Message-id: 1449765106-6528-1-git-send-email-dgilbert@redhat.com Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
- Dec 02, 2015
-
-
Paolo Bonzini authored
Dividing integer expressions transferred_bytes and time_spent, and then converting the integer quotient to type double. Any remainder, or fractional part of the quotient, is ignored. Fix this. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Markus Armbruster authored
socket_writev_buffer() writes in a loop, using g_poll() to block. If g_poll() fails, it tries to write more before the file descriptor is ready. In theory, this could go into a tight loop. In practice, errors other than EINTR are really unlikely, and when they happen, we're probably screwed anyway, so we can just as well loop. Clean it up a bit: retry poll on EINTR, keep ignoring other errors. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
- Nov 25, 2015
-
-
Wen Congyang authored
If we set migration speed in a very large value, block-migration will try to read all data to the memory. Because (block_mig_state.submitted + block_mig_state.read_done) * BLOCK_SIZE will be overflow, and it will be always less than rate limit. There is no need to read too many data into memory when the rate limit is very large. So limit the memory usage can fix the overflow problem. Signed-off-by:
Wen Congyang <wency@cn.fujitsu.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Dr. David Alan Gilbert authored
madvise() returns EINVAL in the case of many failures, but also returns it in cases where the host kernel doesn't have THP enabled. Postcopy only really cares that THP is off before it detects faults, and turns it back on afterwards; so we're going to have to assume that if the madvise fails then the host just doesn't do THP and we can carry on with the postcopy. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Tested-by:
Jason J. Herne <jjherne@linux.vnet.ibm.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Amit Shah <amit.shah@redhat.com> Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
- Nov 19, 2015
-
-
Denis V. Lunev authored
basically all bdrv_* operations must be called under aio_context_acquire except ones with bdrv_all prefix. Signed-off-by:
Denis V. Lunev <den@openvz.org> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Fam Zheng <famz@redhat.com> CC: Juan Quintela <quintela@redhat.com> CC: Kevin Wolf <kwolf@redhat.com> Tested-by:
Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Denis V. Lunev authored
The patch also ensures proper locking for the operation. Signed-off-by:
Denis V. Lunev <den@openvz.org> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Fam Zheng <famz@redhat.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> CC: Kevin Wolf <kwolf@redhat.com> Tested-by:
Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by:
Juan Quintela <quintela@redhat.com>
-