#
5efc3564 |
| 12-Mar-2018 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
postcopy: helper for waking shared
Provide a helper to send a 'wake' request on a userfaultfd for a shared process. The address in the clients address space is specified together with the RAMBlock i
postcopy: helper for waking shared
Provide a helper to send a 'wake' request on a userfaultfd for a shared process. The address in the clients address space is specified together with the RAMBlock it was resolved to.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
#
c188c539 |
| 20-Mar-2018 |
Michael S. Tsirkin <mst@redhat.com> |
postcopy-ram: add a stub for postcopy_request_shared_page
This fixes the build on systems without userfaultfd.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
#
096bf4c8 |
| 12-Mar-2018 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
vhost+postcopy: Helper to send requests to source for shared pages
Provide a helper to be used by shared waker functions to request shared pages from the source. The last_rb pointer is moved into th
vhost+postcopy: Helper to send requests to source for shared pages
Provide a helper to be used by shared waker functions to request shared pages from the source. The last_rb pointer is moved into the incoming state since this helper can update it as well as the main fault thread function.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
#
00fa4fc8 |
| 12-Mar-2018 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
postcopy: Allow registering of fd handler
Allow other userfaultfd's to be registered into the fault thread so that handlers for shared memory can get responses.
Signed-off-by: Dr. David Alan Gilber
postcopy: Allow registering of fd handler
Allow other userfaultfd's to be registered into the fault thread so that handlers for shared memory can get responses.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
#
1693c64c |
| 12-Mar-2018 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
postcopy: Add notifier chain
Add a notifier chain for postcopy with a 'reason' flag and an opportunity for a notifier member to return an error.
Call it when enabling postcopy.
This will initially
postcopy: Add notifier chain
Add a notifier chain for postcopy with a 'reason' flag and an opportunity for a notifier member to return an error.
Call it when enabling postcopy.
This will initially used to enable devices to declare they're unable to postcopy and later to notify of devices of stages within postcopy.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
#
2ce16640 |
| 12-Mar-2018 |
Dr. David Alan Gilbert <dgilbert@redhat.com> |
postcopy: use UFFDIO_ZEROPAGE only when available
Use a flag on the RAMBlock to state whether it has the UFFDIO_ZEROPAGE capability, use it when it's available.
This allows the use of postcopy on t
postcopy: use UFFDIO_ZEROPAGE only when available
Use a flag on the RAMBlock to state whether it has the UFFDIO_ZEROPAGE capability, use it when it's available.
This allows the use of postcopy on tmpfs as well as hugepage backed files.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
Revision tags: v2.11.1 |
|
#
9ab7ef9b |
| 08-Feb-2018 |
Peter Xu <peterx@redhat.com> |
migration: provide postcopy_fault_thread_notify()
A general helper to notify the fault thread.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com>
migration: provide postcopy_fault_thread_notify()
A general helper to notify the fault thread.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <20180208103132.28452-4-peterx@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
show more ...
|
#
64f615fe |
| 08-Feb-2018 |
Peter Xu <peterx@redhat.com> |
migration: reuse mis->userfault_quit_fd
It was only used for quitting the page fault thread before. Let it be something more useful - now we can use it to notify a "wake" for the page fault thread (
migration: reuse mis->userfault_quit_fd
It was only used for quitting the page fault thread before. Let it be something more useful - now we can use it to notify a "wake" for the page fault thread (for any reason), and it only means "quit" if the fault_thread_quit is set.
Since we changed what it does, renaming it to userfault_event_fd.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <20180208103132.28452-3-peterx@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
show more ...
|
#
ee86981b |
| 22-Jan-2018 |
Peter Maydell <peter.maydell@linaro.org> |
migration: Revert postcopy-blocktime commit set
This reverts commits ca6011c migration: add postcopy total blocktime into query-migrate 5f32dc8 migration: add blocktime calculation into migration-te
migration: Revert postcopy-blocktime commit set
This reverts commits ca6011c migration: add postcopy total blocktime into query-migrate 5f32dc8 migration: add blocktime calculation into migration-test 2f7dae9 migration: postcopy_blocktime documentation 3be98be migration: calculate vCPU blocktime on dst side 01a87f0 migration: add postcopy blocktime ctx into MigrationIncomingState 31bf06a migration: introduce postcopy-blocktime capability
as they don't build on ppc32 due to trying to do atomic accesses on types that are larger than the host pointer type.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
Revision tags: v2.10.2, v2.11.0, v2.11.0-rc5, v2.11.0-rc4, v2.11.0-rc3, v2.11.0-rc2, v2.11.0-rc1, v2.11.0-rc0 |
|
#
ca6011c2 |
| 30-Oct-2017 |
Alexey Perevalov <a.perevalov@samsung.com> |
migration: add postcopy total blocktime into query-migrate
Postcopy total blocktime is available on destination side only. But query-migrate was possible only for source. This patch adds ability to
migration: add postcopy total blocktime into query-migrate
Postcopy total blocktime is available on destination side only. But query-migrate was possible only for source. This patch adds ability to call query-migrate on destination. To be able to see postcopy blocktime, need to request postcopy-blocktime capability.
The query-migrate command will show following sample result: {"return": "postcopy-vcpu-blocktime": [115, 100], "status": "completed", "postcopy-blocktime": 100 }}
postcopy_vcpu_blocktime contains list, where the first item is the first vCPU in QEMU.
This patch has a drawback, it combines states of incoming and outgoing migration. Ongoing migration state will overwrite incoming state. Looks like better to separate query-migrate for incoming and outgoing migration or add parameter to indicate type of migration.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
#
3be98be4 |
| 30-Oct-2017 |
Alexey Perevalov <a.perevalov@samsung.com> |
migration: calculate vCPU blocktime on dst side
This patch provides blocktime calculation per vCPU, as a summary and as a overlapped value for all vCPUs.
This approach was suggested by Peter Xu, as
migration: calculate vCPU blocktime on dst side
This patch provides blocktime calculation per vCPU, as a summary and as a overlapped value for all vCPUs.
This approach was suggested by Peter Xu, as an improvements of previous approch where QEMU kept tree with faulted page address and cpus bitmask in it. Now QEMU is keeping array with faulted page address as value and vCPU as index. It helps to find proper vCPU at UFFD_COPY time. Also it keeps list for blocktime per vCPU (could be traced with page_fault_addr)
Blocktime will not calculated if postcopy_blocktime field of MigrationIncomingState wasn't initialized.
Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
#
01a87f0b |
| 30-Oct-2017 |
Alexey Perevalov <a.perevalov@samsung.com> |
migration: add postcopy blocktime ctx into MigrationIncomingState
This patch adds request to kernel space for UFFD_FEATURE_THREAD_ID, in case this feature is provided by kernel.
PostcopyBlocktimeCo
migration: add postcopy blocktime ctx into MigrationIncomingState
This patch adds request to kernel space for UFFD_FEATURE_THREAD_ID, in case this feature is provided by kernel.
PostcopyBlocktimeContext is encapsulated inside postcopy-ram.c, due to it being a postcopy-only feature. Also it defines PostcopyBlocktimeContext's instance live time. Information from PostcopyBlocktimeContext instance will be provided much after postcopy migration end, instance of PostcopyBlocktimeContext will live till QEMU exit, but part of it (vcpu_addr, page_fault_vcpu_time) used only during calculation, will be released when postcopy ended or failed.
To enable postcopy blocktime calculation on destination, need to request proper compatibility (Patch for documentation will be at the tail of the patch set).
As an example following command enable that capability, assume QEMU was started with -chardev socket,id=charmonitor,path=/var/lib/migrate-vm-monitor.sock option to control it
[root@host]#printf "{\"execute\" : \"qmp_capabilities\"}\r\n \ {\"execute\": \"migrate-set-capabilities\" , \"arguments\": { \"capabilities\": [ { \"capability\": \"postcopy-blocktime\", \"state\": true } ] } }" | nc -U /var/lib/migrate-vm-monitor.sock
Or just with HMP (qemu) migrate_set_capability postcopy-blocktime on
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
#
f9494614 |
| 05-Oct-2017 |
Alexey Perevalov <a.perevalov@samsung.com> |
migration: add bitmap for received page
This patch adds ability to track down already received pages, it's necessary for calculation vCPU block time in postcopy migration feature, and for recovery a
migration: add bitmap for received page
This patch adds ability to track down already received pages, it's necessary for calculation vCPU block time in postcopy migration feature, and for recovery after postcopy migration failure.
Also it's necessary to solve shared memory issue in postcopy livemigration. Information about received pages will be transferred to the software virtual bridge (e.g. OVS-VSWITCHD), to avoid fallocate (unmap) for already received pages. fallocate syscall is required for remmaped shared memory, due to remmaping itself blocks ioctl(UFFDIO_COPY, ioctl in this case will end with EEXIT error (struct page is exists after remmap).
Bitmap is placed into RAMBlock as another postcopy/precopy related bitmaps.
Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
#
727b9d7e |
| 05-Oct-2017 |
Alexey Perevalov <a.perevalov@samsung.com> |
migration: introduce qemu_ufd_copy_ioctl helper
Just for placing auxilary operations inside helper, auxilary operations like: track received pages, notify about copying operation in futher patches.
migration: introduce qemu_ufd_copy_ioctl helper
Just for placing auxilary operations inside helper, auxilary operations like: track received pages, notify about copying operation in futher patches.
Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
#
8be4620b |
| 05-Oct-2017 |
Alexey Perevalov <a.perevalov@samsung.com> |
migration: postcopy_place_page factoring out
Need to mark copied pages as closer as possible to the place where it tracks down. That will be necessary in futher patch.
Reviewed-by: Dr. David Alan G
migration: postcopy_place_page factoring out
Need to mark copied pages as closer as possible to the place where it tracks down. That will be necessary in futher patch.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
Revision tags: v2.10.1 |
|
#
54ae0886 |
| 19-Sep-2017 |
Alexey Perevalov <a.perevalov@samsung.com> |
migration: split ufd_version_check onto receive/request features part
This modification is necessary for userfault fd features which are required to be requested from userspace. UFFD_FEATURE_THREAD_
migration: split ufd_version_check onto receive/request features part
This modification is necessary for userfault fd features which are required to be requested from userspace. UFFD_FEATURE_THREAD_ID is a one of such "on demand" feature, which will be introduced in the next patch.
QEMU have to use separate userfault file descriptor, due to userfault context has internal state, and after first call of ioctl UFFD_API it changes its state to UFFD_STATE_RUNNING (in case of success), but kernel while handling ioctl UFFD_API expects UFFD_STATE_WAIT_API. So only one ioctl with UFFD_API is possible per ufd.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
#
5553499f |
| 19-Sep-2017 |
Alexey Perevalov <a.perevalov@samsung.com> |
migration: fix hardcoded function name in error report
Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Alexey Perevalov <a.p
migration: fix hardcoded function name in error report
Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
#
d7651f15 |
| 19-Sep-2017 |
Alexey Perevalov <a.perevalov@samsung.com> |
migration: pass MigrationIncomingState* into migration check functions
That tiny refactoring is necessary to be able to set UFFD_FEATURE_THREAD_ID while requesting features, and then to create downt
migration: pass MigrationIncomingState* into migration check functions
That tiny refactoring is necessary to be able to set UFFD_FEATURE_THREAD_ID while requesting features, and then to create downtime context in case when kernel supports it.
Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
Revision tags: v2.9.1, v2.10.0, v2.10.0-rc4, v2.10.0-rc3, v2.10.0-rc2, v2.10.0-rc1, v2.10.0-rc0 |
|
#
1adc1cee |
| 24-Apr-2017 |
Juan Quintela <quintela@redhat.com> |
migration: Remove unneeded includes
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com>
|
#
6666c96a |
| 24-Apr-2017 |
Juan Quintela <quintela@redhat.com> |
migration: Move migration.h to migration/
Nothing uses it outside of migration.h
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by
migration: Move migration.h to migration/
Nothing uses it outside of migration.h
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com>
show more ...
|
Revision tags: v2.8.1.1, v2.9.0, v2.9.0-rc5 |
|
#
7b1e1a22 |
| 17-Apr-2017 |
Juan Quintela <quintela@redhat.com> |
migration: Export ram.c functions in its own file
All functions are internal except for ram_mig_init(). Create migration/misc.h for this kind of functions.
Signed-off-by: Juan Quintela <quintela@r
migration: Export ram.c functions in its own file
All functions are internal except for ram_mig_init(). Create migration/misc.h for this kind of functions.
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
show more ...
|
#
08a0aee1 |
| 20-Apr-2017 |
Juan Quintela <quintela@redhat.com> |
migration: Split qemu-file.h
Split the file into public and internal interfaces. I have to rename the external one because we can't have two include files with the same name in the same directory.
migration: Split qemu-file.h
Split the file into public and internal interfaces. I have to rename the external one because we can't have two include files with the same name in the same directory. Build system gets confused. The only exported functions are the ones that handle basic types.
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
show more ...
|
#
660819b1 |
| 19-May-2017 |
Peter Xu <peterx@redhat.com> |
migration: shut src return path unconditionally
We were do the shutting off only for postcopy. Now we do this as long as the source return path is there.
Moving the cleanup of from_src_file there t
migration: shut src return path unconditionally
We were do the shutting off only for postcopy. Now we do this as long as the source return path is there.
Moving the cleanup of from_src_file there too.
Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
#
20a519a0 |
| 20-Apr-2017 |
Juan Quintela <quintela@redhat.com> |
migration: Create savevm.h for functions exported from savevm.c
This removes last trace of migration functions from sysemu/sysemu.h.
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by:
migration: Create savevm.h for functions exported from savevm.c
This removes last trace of migration functions from sysemu/sysemu.h.
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com>
show more ...
|
#
51180423 |
| 24-Apr-2017 |
Juan Quintela <quintela@redhat.com> |
exec: Create include for target_page_size()
That is the only function that we need from exec.c, and having to include the whole sysemu.h for this.
Signed-off-by: Juan Quintela <quintela@redhat.com>
exec: Create include for target_page_size()
That is the only function that we need from exec.c, and having to include the whole sysemu.h for this.
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
/me leans to be less sloppy with copyright notices thanks Dave
show more ...
|