[Qemu-devel] [PATCH V6 03/10] migration: fix hardcoded function name in error report

2017-05-23 Thread Alexey Perevalov
Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- migration/postcopy-ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index 4adab36..3e

[Qemu-devel] [PATCH V6 06/10] migration: add postcopy blocktime ctx into MigrationIncomingState

2017-05-23 Thread Alexey Perevalov
ot;state\": true } ] } }" | nc -U /var/lib/migrate-vm-monitor.sock Or just with HMP (qemu) migrate_set_capability postcopy-blocktime on Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- include/migration/migration.h | 8 + migration/postcopy-ram.c | 80 ++

[Qemu-devel] [PATCH V6 07/10] migration: add bitmap for copied page

2017-05-23 Thread Alexey Perevalov
postcopy-ram.c - hardware independed code. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- include/migration/migration.h | 16 +++ migration/postcopy-ram.c | 22 --- migration/ram.c | 63 +++ 3

[Qemu-devel] [PATCH V6 08/10] migration: calculate vCPU blocktime on dst side

2017-05-23 Thread Alexey Perevalov
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

[Qemu-devel] [PATCH V6 02/10] migration: pass MigrationIncomingState* into migration check functions

2017-05-23 Thread Alexey Perevalov
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.pereva...@samsung.com> --- migration/migration.c| 2 +- migration/postcopy

[Qemu-devel] [PATCH V6 04/10] migration: split ufd_version_check onto receive/request features part

2017-05-23 Thread Alexey Perevalov
ontext 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. Signed-off-by: Alexey Perevalov <a.pereva..

[Qemu-devel] [PATCH V6 05/10] migration: introduce postcopy-blocktime capability

2017-05-23 Thread Alexey Perevalov
com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- include/migration/migration.h | 1 + migration/migration.c | 9 + qapi-schema.json | 5 - 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/include/migration/migration.h b/inclu

[Qemu-devel] [PATCH V6 10/10] migration: postcopy_blocktime documentation

2017-05-23 Thread Alexey Perevalov
Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- docs/migration.txt | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/migration.txt b/docs/migration.txt index 1b940a8..2207c6d 100644 --- a/docs/migration.txt +++ b/docs/migration.txt @@ -402,6 +402,16 @@ wi

[Qemu-devel] [PATCH V6 01/10] userfault: add pid into uffd_msg & update UFFD_FEATURE_*

2017-05-23 Thread Alexey Perevalov
This commit duplicates header of "userfaultfd: provide pid in userfault msg" into linux kernel. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- linux-headers/linux/userfaultfd.h | 5 + 1 file changed, 5 insertions(+) diff --git a/linux-headers/linux/userfa

[Qemu-devel] [PATCH V6 00/10] calculate blocktime for postcopy live migration

2017-05-23 Thread Alexey Perevalov
sed on commit 56821559f0ba682fe6b367815572e6f974d329ab "Merge remote-tracking branch 'dgilbert/tags/pull-hmp-20170517' into staging" Alexey Perevalov (10): userfault: add pid into uffd_msg & update UFFD_FEATURE_* migration: pass MigrationIncomingState* into migration check functions

Re: [Qemu-devel] [PATCH V6 07/10] migration: add bitmap for copied page

2017-05-24 Thread Alexey Perevalov
On 05/24/2017 03:01 PM, Peter Xu wrote: On Wed, May 24, 2017 at 10:56:37AM +0300, Alexey wrote: On Wed, May 24, 2017 at 02:57:36PM +0800, Peter Xu wrote: On Tue, May 23, 2017 at 02:31:08PM +0300, Alexey Perevalov wrote: This patch adds ability to track down already copied pages, it's

Re: [Qemu-devel] [PATCH V6 08/10] migration: calculate vCPU blocktime on dst side

2017-05-24 Thread Alexey Perevalov
On 05/24/2017 02:22 PM, Peter Xu wrote: On Wed, May 24, 2017 at 12:37:20PM +0300, Alexey wrote: On Wed, May 24, 2017 at 03:53:05PM +0800, Peter Xu wrote: On Tue, May 23, 2017 at 02:31:09PM +0300, Alexey Perevalov wrote: This patch provides blocktime calculation per vCPU, as a summary

Re: [Qemu-devel] [PATCH V6 04/10] migration: split ufd_version_check onto receive/request features part

2017-05-24 Thread Alexey Perevalov
t;32 it will not overflow since by default a constant "1" is a "int" typed (and it's 32bit width). Thanks, -- Best regards, Alexey Perevalov

Re: [Qemu-devel] [PATCH V6 07/10] migration: add bitmap for copied page

2017-05-25 Thread Alexey Perevalov
On 05/25/2017 02:30 AM, Peter Xu wrote: On Wed, May 24, 2017 at 03:16:23PM +0300, Alexey Perevalov wrote: On 05/24/2017 03:01 PM, Peter Xu wrote: On Wed, May 24, 2017 at 10:56:37AM +0300, Alexey wrote: On Wed, May 24, 2017 at 02:57:36PM +0800, Peter Xu wrote: On Tue, May 23, 2017 at 02:31

Re: [Qemu-devel] [PATCH V5 7/9] migration: calculate vCPU blocktime on dst side

2017-05-22 Thread Alexey Perevalov
On 05/19/2017 10:05 PM, Dr. David Alan Gilbert wrote: * Alexey (a.pereva...@samsung.com) wrote: On Tue, May 16, 2017 at 12:34:16PM +0100, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: This patch provides blocktime calculation per vCPU, as a summary

[Qemu-devel] [[PATCH V7] 02/11] migration: pass MigrationIncomingState* into migration check functions

2017-06-07 Thread Alexey Perevalov
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.pereva...@samsung.com> --- migration/migration.c| 3 ++- migration/postcopy

[Qemu-devel] [[PATCH V7] 03/11] migration: fix hardcoded function name in error report

2017-06-07 Thread Alexey Perevalov
Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- migration/postcopy-ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index 10d39a0..99

[Qemu-devel] [[PATCH V7] 09/11] migration: calculate vCPU blocktime on dst side

2017-06-07 Thread Alexey Perevalov
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

[Qemu-devel] [[PATCH V7] 10/11] migration: add postcopy total blocktime into query-migrate

2017-06-07 Thread Alexey Perevalov
wback, 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 <dgilb...@

Re: [Qemu-devel] [[PATCH V7] 09/11] migration: calculate vCPU blocktime on dst side

2017-06-07 Thread Alexey Perevalov
as a standalone patch. it's not bad to check every patch in sequence separately, but including previous patches ) Fam -- Best regards, Alexey Perevalov

Re: [Qemu-devel] [PATCH V6 08/10] migration: calculate vCPU blocktime on dst side

2017-06-07 Thread Alexey Perevalov
On 06/01/2017 01:57 PM, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: 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

[Qemu-devel] [[PATCH V7] 07/11] migration: add bitmap for copied page

2017-06-07 Thread Alexey Perevalov
after remmap). Bitmap is placed into RAMBlock as another postcopy/precopy related bitmaps. Helpers are in migration/ram.c, due to in this file is allowing to work with RAMBlock. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- include/exec/ram_addr.h | 2 ++ migration

[Qemu-devel] [[PATCH V7] 11/11] migration: postcopy_blocktime documentation

2017-06-07 Thread Alexey Perevalov
Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- docs/migration.txt | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/migration.txt b/docs/migration.txt index 1b940a8..4b625ca 100644 --- a/docs/m

[Qemu-devel] [[PATCH V7] 00/11] calculate blocktime for postcopy live migration

2017-06-07 Thread Alexey Perevalov
sed on commit a0d4aac7467dd02e5657b79e867f067330266a24 of git://git.qemu-project.org/qemu.git Alexey Perevalov (11): userfault: add pid into uffd_msg & update UFFD_FEATURE_* migration: pass MigrationIncomingState* into migration check functions migration: fix hardcoded function name in error report migration: split ufd_v

[Qemu-devel] [[PATCH V7] 06/11] migration: add postcopy blocktime ctx into MigrationIncomingState

2017-06-07 Thread Alexey Perevalov
ot;state\": true } ] } }" | nc -U /var/lib/migrate-vm-monitor.sock Or just with HMP (qemu) migrate_set_capability postcopy-blocktime on Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- include/migration/migration.h | 8 ++ migration/postcopy-ram.c | 65 ++

[Qemu-devel] [[PATCH V7] 01/11] userfault: add pid into uffd_msg & update UFFD_FEATURE_*

2017-06-07 Thread Alexey Perevalov
This commit duplicates header of "userfaultfd: provide pid in userfault msg" into linux kernel. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- linux-headers/linux/userfaultfd.h | 4 1 file changed, 4 insertions(+) diff --git a/linux-headers/linux/userfa

[Qemu-devel] [[PATCH V7] 05/11] migration: introduce postcopy-blocktime capability

2017-06-07 Thread Alexey Perevalov
com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- include/migration/migration.h | 1 + migration/migration.c | 9 + qapi-schema.json | 5 - 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/include/migration/migration.h b/inclu

[Qemu-devel] [[PATCH V7] 04/11] migration: split ufd_version_check onto receive/request features part

2017-06-07 Thread Alexey Perevalov
ontext 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. Signed-off-by: Alexey Perevalov <a.pereva..

[Qemu-devel] [[PATCH V7] 08/11] migration: postcopy_place_page factoring out

2017-06-07 Thread Alexey Perevalov
Need to set copied bitmap as closer as possible to mark_postcopy_blocktime_end. So postcopy_place_page is proper place. RAMBlock argument here could avoid additional RAMBlock lookup as well as reduce number of arguments (no need to pass pointer to copied bitmap). Signed-off-by: Alexey Perevalov

[Qemu-devel] [PATCH v8 07/11] migration: add bitmap for copied page

2017-06-07 Thread Alexey Perevalov
after remmap). Bitmap is placed into RAMBlock as another postcopy/precopy related bitmaps. Helpers are in migration/ram.c, due to in this file is allowing to work with RAMBlock. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- include/exec/ram_addr.h | 2 ++ migration

[Qemu-devel] [PATCH v8 10/11] migration: add postcopy total blocktime into query-migrate

2017-06-07 Thread Alexey Perevalov
wback, 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 <dgilb...@

[Qemu-devel] [PATCH v8 02/11] migration: pass MigrationIncomingState* into migration check functions

2017-06-07 Thread Alexey Perevalov
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.pereva...@samsung.com> --- migration/migration.c| 3 ++- migration/postcopy

[Qemu-devel] [PATCH v8 00/11] calculate blocktime for postcopy live migration

2017-06-07 Thread Alexey Perevalov
- It doesn't send back the downtime, just trace it This patch set is based on commit a0d4aac7467dd02e5657b79e867f067330266a24 of git://git.qemu-project.org/qemu.git Alexey Perevalov (11): userfault: add pid into uffd_msg & update UFFD_FEATURE_* migration: pass MigrationIncomingState* into migration

[Qemu-devel] [PATCH v8 08/11] migration: postcopy_place_page factoring out

2017-06-07 Thread Alexey Perevalov
Need to mark paged copied as closer as possible place where it tracks down. That will be necessary in futher patch. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- migration/postcopy-ram.c | 13 - migration/postcopy-ram.h | 4 ++-- migration/ram.c | 4 +

[Qemu-devel] [PATCH v8 05/11] migration: introduce postcopy-blocktime capability

2017-06-07 Thread Alexey Perevalov
com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- include/migration/migration.h | 1 + migration/migration.c | 9 + qapi-schema.json | 5 - 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/include/migration/migration.h b/inclu

[Qemu-devel] [PATCH v8 04/11] migration: split ufd_version_check onto receive/request features part

2017-06-07 Thread Alexey Perevalov
ontext 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. Signed-off-by: Alexey Perevalov <a.pereva..

[Qemu-devel] [PATCH v8 09/11] migration: calculate vCPU blocktime on dst side

2017-06-07 Thread Alexey Perevalov
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

[Qemu-devel] [PATCH v8 06/11] migration: add postcopy blocktime ctx into MigrationIncomingState

2017-06-07 Thread Alexey Perevalov
ot;state\": true } ] } }" | nc -U /var/lib/migrate-vm-monitor.sock Or just with HMP (qemu) migrate_set_capability postcopy-blocktime on Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- include/migration/migration.h | 8 ++ migration/postcopy-ram.c | 65 ++

[Qemu-devel] [PATCH v8 01/11] userfault: add pid into uffd_msg & update UFFD_FEATURE_*

2017-06-07 Thread Alexey Perevalov
This commit duplicates header of "userfaultfd: provide pid in userfault msg" into linux kernel. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- linux-headers/linux/userfaultfd.h | 4 1 file changed, 4 insertions(+) diff --git a/linux-headers/linux/userfa

[Qemu-devel] [PATCH v8 03/11] migration: fix hardcoded function name in error report

2017-06-07 Thread Alexey Perevalov
Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- migration/postcopy-ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index 10d39a0..88

[Qemu-devel] [PATCH v8 11/11] migration: postcopy_blocktime documentation

2017-06-07 Thread Alexey Perevalov
Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- docs/migration.txt | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/migration.txt b/docs/migration.txt index 1b940a8..4b625ca 100644 --- a/docs/m

Re: [Qemu-devel] [PATCH v8 06/11] migration: add postcopy blocktime ctx into MigrationIncomingState

2017-06-07 Thread Alexey Perevalov
On 06/07/2017 03:43 PM, Juan Quintela wrote: Alexey Perevalov <a.pereva...@samsung.com> wrote: This patch adds request to kernel space for UFFD_FEATURE_THREAD_ID, in case when this feature is provided by kernel. I think this function is wrong migration_exit_cb will be called at QEM

Re: [Qemu-devel] [PATCH v8 11/11] migration: postcopy_blocktime documentation

2017-06-07 Thread Alexey Perevalov
On 06/07/2017 03:52 PM, Juan Quintela wrote: Alexey Perevalov <a.pereva...@samsung.com> wrote: Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- docs/migration.txt | 10 ++ 1 file changed, 10 i

Re: [Qemu-devel] [PATCH V6 02/10] migration: pass MigrationIncomingState* into migration check functions

2017-06-04 Thread Alexey Perevalov
On 05/31/2017 08:54 PM, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: 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

Re: [Qemu-devel] [PATCH V6 06/10] migration: add postcopy blocktime ctx into MigrationIncomingState

2017-06-05 Thread Alexey Perevalov
On 05/24/2017 06:31 AM, Peter Xu wrote: On Tue, May 23, 2017 at 02:31:07PM +0300, Alexey Perevalov wrote: This patch adds request to kernel space for UFFD_FEATURE_THREAD_ID, in case when this feature is provided by kernel. PostcopyBlocktimeContext is incapsulated inside postcopy-ram.c, due

Re: [Qemu-devel] [PATCH v8 07/11] migration: add bitmap for copied page

2017-06-07 Thread Alexey Perevalov
On 06/07/2017 12:46 PM, Alexey Perevalov wrote: This patch adds ability to track down already copied pages, it's necessary for calculation vCPU block time in postcopy migration feature, maybe for restore after postcopy migration failure. Also it's necessary to solve shared memory issue

Re: [Qemu-devel] [PATCH v8 07/11] migration: add bitmap for copied page

2017-06-07 Thread Alexey Perevalov
On 06/07/2017 03:56 PM, Juan Quintela wrote: Alexey Perevalov <a.pereva...@samsung.com> wrote: +static unsigned long get_copiedmap_size(RAMBlock *rb) +{ +unsigned long pages; +pages = rb->max_length >> find_first_bit((unsigned lo

[Qemu-devel] [PATCH v1 0/2] Add bitmap for copied pages in postcopy migration

2017-06-13 Thread Alexey Perevalov
functions are required in virtio. Alexey Perevalov (2): migration: postcopy_place_page factoring out migration: add bitmap for copied page include/exec/ram_addr.h | 3 +++ include/migration/migration.h | 3 +++ migration/postcopy-ram.c | 20 +++ migration/postcopy-ram.h

Re: [Qemu-devel] [PATCH v1 2/2] migration: add bitmap for copied page

2017-06-13 Thread Alexey Perevalov
On 06/13/2017 02:42 PM, Juan Quintela wrote: Alexey Perevalov <a.pereva...@samsung.com> wrote: Hi I think that it would make things clearer if we do a s/copied/received/ As what we are tracking here are the pages that have already been received. yes, sounds good This patch adds a

[Qemu-devel] [PATCH v1 2/2] migration: add bitmap for copied page

2017-06-13 Thread Alexey Perevalov
after remmap). Bitmap is placed into RAMBlock as another postcopy/precopy related bitmaps. copied bitmap is not releasing due to ramblocks is not releasing too. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- include/exec/ram_addr.h | 3 +++ include/migration/migra

[Qemu-devel] [PATCH v1 1/2] migration: postcopy_place_page factoring out

2017-06-13 Thread Alexey Perevalov
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: Juan Quintela <quint...@redhat.com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- migration/postcopy-ram.c | 13

[Qemu-devel] [PATCH v3 0/3] Add bitmap for received pages in postcopy migration

2017-06-16 Thread Alexey Perevalov
ad_cleanup - new patch "migration: introduce qemu_ufd_copy_ioctl helper" Patchset is based on Juan's patchset: [PATCH v2 0/5] Create setup/cleanup methods for migration incoming side Alexey Perevalov (3): migration: postcopy_place_page factoring out migration: introduce qemu_u

[Qemu-devel] [PATCH v3 2/3] migration: introduce qemu_ufd_copy_ioctl helper

2017-06-16 Thread Alexey Perevalov
Just for placing auxilary operations inside helper, auxilary operations like: track received pages, notify about copying operation in futher patches. Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> Reviewed-by: Peter Xu <pet...@redhat.com> Signed-off-by: Alexey Pereval

[Qemu-devel] [PATCH v3 1/3] migration: postcopy_place_page factoring out

2017-06-16 Thread Alexey Perevalov
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 <dgilb...@redhat.com> Reviewed-by: Peter Xu <pet...@redhat.com> Reviewed-by: Juan Quintela <quint...@redhat.com> Sig

[Qemu-devel] [PATCH v9 3/8] migration: fix hardcoded function name in error report

2017-06-16 Thread Alexey Perevalov
Reviewed-by: Juan Quintela <quint...@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- migration/postcopy-ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migratio

[Qemu-devel] [PATCH v9 1/8] userfault: add pid into uffd_msg & update UFFD_FEATURE_*

2017-06-16 Thread Alexey Perevalov
This commit duplicates header of "userfaultfd: provide pid in userfault msg" into linux kernel. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- linux-headers/linux/userfaultfd.h | 4 1 file changed, 4 insertions(+) diff --git a/linux-headers/linux/userfa

[Qemu-devel] [PATCH v9 5/8] migration: introduce postcopy-blocktime capability

2017-06-16 Thread Alexey Perevalov
com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- migration/migration.c | 9 + migration/migration.h | 1 + qapi-schema.json | 5 - 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/migration/migration.c b/migration/migration.c index 56929dc..f9

Re: [Qemu-devel] [PATCH v2 3/3] migration: add bitmap for received page

2017-06-16 Thread Alexey Perevalov
On 06/16/2017 08:14 PM, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: This patch adds ability to track down already received pages, it's necessary for calculation vCPU block time in postcopy migration feature, maybe for restore after postcopy migration

[Qemu-devel] [PATCH v9 0/8] calculate blocktime for postcopy live migration

2017-06-16 Thread Alexey Perevalov
when kernel supports it - It doesn't send back the downtime, just trace it This patch set is based on commit [PATCH v3 0/3] Add bitmap for received pages in postcopy migration Alexey Perevalov (8): userfault: add pid into uffd_msg & update UFFD_FEATURE_* migration: pass MigrationIncomin

[Qemu-devel] [PATCH v9 6/8] migration: add postcopy blocktime ctx into MigrationIncomingState

2017-06-16 Thread Alexey Perevalov
ot;state\": true } ] } }" | nc -U /var/lib/migrate-vm-monitor.sock Or just with HMP (qemu) migrate_set_capability postcopy-blocktime on Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- migration/migration.h| 8 ++ migration/postcopy-ram.c | 65 +

[Qemu-devel] [PATCH v9 8/8] migration: postcopy_blocktime documentation

2017-06-16 Thread Alexey Perevalov
Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- docs/devel/migration.txt | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/devel/migration.txt b/docs/devel/migration.txt index 1b940a8..4b

[Qemu-devel] [PATCH v9 4/8] migration: split ufd_version_check onto receive/request features part

2017-06-16 Thread Alexey Perevalov
..@redhat.com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- migration/postcopy-ram.c | 94 1 file changed, 88 insertions(+), 6 deletions(-) diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index b

[Qemu-devel] [PATCH v9 7/8] migration: calculate vCPU blocktime on dst side

2017-06-16 Thread Alexey Perevalov
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

[Qemu-devel] [PATCH v3 3/3] migration: add bitmap for received page

2017-06-16 Thread Alexey Perevalov
is exists after remmap). Bitmap is placed into RAMBlock as another postcopy/precopy related bitmaps. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- include/exec/ram_addr.h | 3 +++ migration/migration.c| 1 + migration/postcopy-ram.c | 12 ++--- migration/ram.c

Re: [Qemu-devel] [PATCH v2 3/3] migration: add bitmap for received page

2017-06-16 Thread Alexey Perevalov
On 06/16/2017 09:46 PM, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: On 06/16/2017 08:14 PM, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: This patch adds ability to track down already received pages, it's necessary

[Qemu-devel] [PATCH v9 2/8] migration: pass MigrationIncomingState* into migration check functions

2017-06-16 Thread Alexey Perevalov
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.pereva...@samsung.com> --- migration/migration.c| 3 ++- migration/postcopy

Re: [Qemu-devel] [PATCH v1 2/2] migration: add bitmap for copied page

2017-06-14 Thread Alexey Perevalov
On 06/13/2017 02:42 PM, Juan Quintela wrote: Alexey Perevalov <a.pereva...@samsung.com> wrote: Hi I think that it would make things clearer if we do a s/copied/received/ As what we are tracking here are the pages that have already been received. This patch adds ability to track down a

Re: [Qemu-devel] [PATCH v1 2/2] migration: add bitmap for copied page

2017-06-14 Thread Alexey Perevalov
On 06/14/2017 08:12 AM, Peter Xu wrote: On Tue, Jun 13, 2017 at 12:36:33PM +0300, Alexey Perevalov wrote: This patch adds ability to track down already copied pages, it's necessary for calculation vCPU block time in postcopy migration feature, maybe for restore after postcopy migration failure

Re: [Qemu-devel] [PATCH v1 2/2] migration: add bitmap for copied page

2017-06-14 Thread Alexey Perevalov
On 06/14/2017 09:53 AM, Peter Xu wrote: On Wed, Jun 14, 2017 at 09:39:53AM +0300, Alexey Perevalov wrote: On 06/14/2017 08:12 AM, Peter Xu wrote: On Tue, Jun 13, 2017 at 12:36:33PM +0300, Alexey Perevalov wrote: This patch adds ability to track down already copied pages, it's necessary

Re: [Qemu-devel] [PATCH v2 3/3] migration: add bitmap for received page

2017-06-16 Thread Alexey Perevalov
On 06/16/2017 12:06 PM, Peter Xu wrote: On Thu, Jun 15, 2017 at 07:36:15PM +0300, Alexey Perevalov wrote: [...] +void init_receivedmap(void) +{ +RAMBlock *rb; + +RAMBLOCK_FOREACH(rb) { +unsigned long pages; +pages = rb->max_length >> TARGET_PAGE_BITS; Nit

[Qemu-devel] [PATCH v2 0/3] Add bitmap for received pages in postcopy migration

2017-06-15 Thread Alexey Perevalov
r" Patchset is based on Juan's patchset: [PATCH v2 0/5] Create setup/cleanup methods for migration incoming side Alexey Perevalov (3): migration: postcopy_place_page factoring out migration: introduce qemu_ufd_copy_ioctl helper migration: add bitmap for received page include/exec

[Qemu-devel] [PATCH v2 1/3] migration: postcopy_place_page factoring out

2017-06-15 Thread Alexey Perevalov
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: Juan Quintela <quint...@redhat.com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- migration/postcopy-ram.c | 13

[Qemu-devel] [PATCH v2 2/3] migration: introduce qemu_ufd_copy_ioctl helper

2017-06-15 Thread Alexey Perevalov
Just for placing auxilary operations inside helper, auxilary operations like: track received pages, notify about copying operation in futher patches. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- migration/postcopy-ram.c | 35 ++- 1 file c

[Qemu-devel] [PATCH v2 3/3] migration: add bitmap for received page

2017-06-15 Thread Alexey Perevalov
is exists after remmap). Bitmap is placed into RAMBlock as another postcopy/precopy related bitmaps. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- include/exec/ram_addr.h | 2 ++ migration/postcopy-ram.c | 11 --- migration/ram.c

Re: [Qemu-devel] [PATCH v8 07/11] migration: add bitmap for copied page

2017-06-13 Thread Alexey Perevalov
On 06/13/2017 08:59 AM, Peter Xu wrote: On Wed, Jun 07, 2017 at 12:46:34PM +0300, Alexey Perevalov wrote: This patch adds ability to track down already copied pages, it's necessary for calculation vCPU block time in postcopy migration feature, maybe for restore after postcopy migration failure

Re: [Qemu-devel] [PATCH v9 0/8] calculate blocktime for postcopy live migration

2017-09-18 Thread Alexey Perevalov
On 09/18/2017 02:15 PM, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: This is 9th version. The rationale for that idea is following: vCPU could suspend during postcopy live migration until faulted page is not copied into kernel. Downtime on source side it's

Re: [Qemu-devel] [PATCH v10 07/10] migration: calculate vCPU blocktime on dst side

2017-09-22 Thread Alexey Perevalov
On 09/21/2017 02:57 PM, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: 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

Re: [Qemu-devel] [PATCH v10 08/10] migration: postcopy_blocktime documentation

2017-09-21 Thread Alexey Perevalov
On 09/21/2017 03:33 PM, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> Although it does have my R-b it might be worth adding some c

Re: [Qemu-devel] [PATCH v10 06/10] migration: add postcopy blocktime ctx into MigrationIncomingState

2017-09-21 Thread Alexey Perevalov
On 09/21/2017 01:16 PM, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: This patch adds request to kernel space for UFFD_FEATURE_THREAD_ID, in case when this feature is provided by kernel. PostcopyBlocktimeContext is incapsulated inside postcopy-ram.c, due

Re: [Qemu-devel] [PATCH v10 10/10] migration: add postcopy total blocktime into query-migrate

2017-09-21 Thread Alexey Perevalov
On 09/21/2017 03:42 PM, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: 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

Re: [Qemu-devel] [PATCH v10 01/10] userfault: update kernel header for UFFD_FEATURE_*

2017-09-21 Thread Alexey Perevalov
On 09/20/2017 09:43 PM, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: This commit adds modification for UFFD_FEATURE_SIGBUS and UFFD_FEATURE_THREAD_ID. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> This should be replaced with just r

[Qemu-devel] [PATCH] linux-headers: sync against v4.14-rc1

2017-09-22 Thread Alexey Perevalov
Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- include/standard-headers/asm-x86/hyperv.h| 19 ++--- include/standard-headers/linux/pci_regs.h| 42 include/standard-headers/linux/virtio_ring.h | 4 +-- linux-headers/asm-s390

[Qemu-devel] [PATCH] linux-headers: sync against v4.14-rc1

2017-09-22 Thread Alexey Perevalov
ime. Based on a664607440511fdf8cff9d1c2afefbdbca1d1295 "Merge remote-tracking branch 'remotes/famz/tags/build-and-test-automation-pull-request' into staging" Alexey Perevalov (1): linux-headers: sync against v4.14-rc1 include/standard-headers/asm-x86/hyperv.h| 19 ++--- include/standard-headers/linu

[Qemu-devel] [PATCH v10 09/10] migration: add blocktime calculation into postcopy-test

2017-09-19 Thread Alexey Perevalov
This patch just requests blocktime calculation, but doesn't add any facility to check or show it. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- tests/postcopy-test.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/postcopy-test.c b

[Qemu-devel] [PATCH v10 04/10] migration: split ufd_version_check onto receive/request features part

2017-09-19 Thread Alexey Perevalov
..@redhat.com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- migration/postcopy-ram.c | 94 1 file changed, 88 insertions(+), 6 deletions(-) diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index a

[Qemu-devel] [PATCH v10 06/10] migration: add postcopy blocktime ctx into MigrationIncomingState

2017-09-19 Thread Alexey Perevalov
ot;state\": true } ] } }" | nc -U /var/lib/migrate-vm-monitor.sock Or just with HMP (qemu) migrate_set_capability postcopy-blocktime on Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- migration/migration.h| 8 ++ migration/postcopy-ram.c | 65 +

[Qemu-devel] [PATCH v10 07/10] migration: calculate vCPU blocktime on dst side

2017-09-19 Thread Alexey Perevalov
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

[Qemu-devel] [PATCH v10 03/10] migration: fix hardcoded function name in error report

2017-09-19 Thread Alexey Perevalov
Reviewed-by: Juan Quintela <quint...@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- migration/postcopy-ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migratio

[Qemu-devel] [PATCH v10 00/10] calculate blocktime for postcopy live migration

2017-09-19 Thread Alexey Perevalov
This is 10th version. The rationale for that idea is following: vCPU could suspend during postcopy live migration until faulted page is not copied into kernel. Downtime on source side it's a value - time interval since source turn vCPU off, till destination start runnig vCPU. But that value was

[Qemu-devel] [PATCH v10 08/10] migration: postcopy_blocktime documentation

2017-09-19 Thread Alexey Perevalov
Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- docs/devel/migration.txt | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/devel/migration.txt b/docs/devel/migration.txt index 1b940a8..4b

[Qemu-devel] [PATCH v10 01/10] userfault: update kernel header for UFFD_FEATURE_*

2017-09-19 Thread Alexey Perevalov
This commit adds modification for UFFD_FEATURE_SIGBUS and UFFD_FEATURE_THREAD_ID. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- linux-headers/linux/userfaultfd.h | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/linux-headers/linux/userfau

[Qemu-devel] [PATCH v10 02/10] migration: pass MigrationIncomingState* into migration check functions

2017-09-19 Thread Alexey Perevalov
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.pereva...@samsung.com> --- migration/migration.c| 3 ++- migration/postcopy

[Qemu-devel] [PATCH v10 05/10] migration: introduce postcopy-blocktime capability

2017-09-19 Thread Alexey Perevalov
com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- migration/migration.c | 9 + migration/migration.h | 1 + qapi/migration.json | 5 - 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/migration/migration.c b/migration/migration.c index e820d47..4f

[Qemu-devel] [PATCH v10 10/10] migration: add postcopy total blocktime into query-migrate

2017-09-19 Thread Alexey Perevalov
wback, 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 <dgilb...@

Re: [Qemu-devel] [RFC v2 00/32] postcopy+vhost-user/shared ram

2017-10-16 Thread Alexey Perevalov
Hello Maxime On 09/01/2017 04:42 PM, Maxime Coquelin wrote: Hello Alexey, On 09/01/2017 03:34 PM, Alexey Perevalov wrote: Hello David, You wrote in previous version: We've had a postcopy migrate work now, with a few hacks we're still cleaning up, both on vhost-user-bridge and dpdk; so I'll

[Qemu-devel] [PATCH v11 0/6] calculate blocktime for postcopy live migration

2017-10-05 Thread Alexey Perevalov
FEATURE_THREAD_ID is requesting only when kernel supports it - It doesn't send back the downtime, just trace it This patch set is based on commit [PATCH v10 0/3] Add bitmap for received pages in postcopy migration Both patch sets were rebased on commit d147f7e815f97cb477e223586bcb80c316ae10e

[Qemu-devel] [PATCH v11 4/6] migration: postcopy_blocktime documentation

2017-10-05 Thread Alexey Perevalov
Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- docs/devel/migration.txt | 13 + 1 file changed, 13 insertions(+) diff --git a/docs/devel/migration.txt b/docs/devel/migration.txt index 4030703..ce

[Qemu-devel] [PATCH v11 1/6] migration: introduce postcopy-blocktime capability

2017-10-05 Thread Alexey Perevalov
com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- migration/migration.c | 9 + migration/migration.h | 1 + qapi/migration.json | 5 - 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/migration/migration.c b/migration/migration.c index 98429dc..71

[Qemu-devel] [PATCH v11 6/6] migration: add postcopy total blocktime into query-migrate

2017-10-05 Thread Alexey Perevalov
wback, 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 <dgilb...@

[Qemu-devel] [PATCH v11 3/6] migration: calculate vCPU blocktime on dst side

2017-10-05 Thread Alexey Perevalov
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

<    1   2   3   >