Re: [Qemu-devel] [PATCH 4/6] migration: calculate downtime on dst side

2017-04-25 Thread Alexey Perevalov
On 04/25/2017 11:24 AM, Peter Xu wrote: On Fri, Apr 14, 2017 at 04:17:18PM +0300, Alexey Perevalov wrote: [...] +/* + * This function calculates downtime per cpu and trace it + * + * Also it calculates total downtime as an interval's overlap, + * for many vCPU. + * + * The approa

Re: [Qemu-devel] [PATCH 4/6] migration: calculate downtime on dst side

2017-04-25 Thread Alexey Perevalov
On 04/25/2017 01:25 PM, Peter Xu wrote: On Tue, Apr 25, 2017 at 01:10:30PM +0300, Alexey Perevalov wrote: On 04/25/2017 11:24 AM, Peter Xu wrote: On Fri, Apr 14, 2017 at 04:17:18PM +0300, Alexey Perevalov wrote: [...] +/* + * This function calculates downtime per cpu and trace it

Re: [Qemu-devel] [PATCH 3/6] migration: add UFFD_FEATURE_THREAD_ID feature support

2017-04-25 Thread Alexey Perevalov
Fri, Apr 21, 2017 at 06:22:12PM +0300, Alexey wrote: On Fri, Apr 21, 2017 at 11:24:54AM +0100, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: Userfaultfd mechanism is able to provide process thread id, in case when client request it with UFDD_API ioctl. Signed

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

2017-04-25 Thread Alexey Perevalov
This commit duplicates header of "userfaultfd: provide pid in userfault msg" into linux kernel. Signed-off-by: Alexey Perevalov --- linux-headers/linux/userfaultfd.h | 5 + 1 file changed, 5 insertions(+) diff --git a/linux-headers/linux/userfaultfd.h b/linux-headers/linux/use

[Qemu-devel] [PATCH V3 3/6] migration: split ufd_version_check onto receive/request features part

2017-04-25 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 --- migratio

[Qemu-devel] [PATCH V3 0/6] calculate downtime for postcopy live migration

2017-04-25 Thread Alexey Perevalov
onvinience of applying current patch set, for testing until kernel headers arn't synced. Alexey Perevalov (6): userfault: add pid into uffd_msg & update UFFD_FEATURE_* migration: pass ptr to MigrationIncomingState into migration ufd_version_check & postcopy_ram_supported_

[Qemu-devel] [PATCH V3 5/6] migration: calculate downtime on dst side

2017-04-25 Thread Alexey Perevalov
field of MigrationIncomingState wasn't initialized. Signed-off-by: Alexey Perevalov --- include/migration/migration.h | 3 ++ migration/migration.c | 103 ++ migration/postcopy-ram.c | 20 +++- migration/trace-events| 6 +

[Qemu-devel] [PATCH V3 6/6] migration: trace postcopy total downtime

2017-04-25 Thread Alexey Perevalov
It's not possible to transmit it back to source host, due to RP protocol is not expandable. Signed-off-by: Alexey Perevalov --- migration/postcopy-ram.c | 2 ++ migration/trace-events | 1 + 2 files changed, 3 insertions(+) diff --git a/migration/postcopy-ram.c b/migration/postcopy-

[Qemu-devel] [PATCH V3 2/6] migration: pass ptr to MigrationIncomingState into migration ufd_version_check & postcopy_ram_supported_by_host

2017-04-25 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 --- include/migration/postcopy-ram.h | 2 +- migration/migration.c| 2

[Qemu-devel] [PATCH V3 4/6] migration: add postcopy downtime into MigrationIncommingState

2017-04-25 Thread Alexey Perevalov
This patch add request to kernel space for UFFD_FEATURE_THREAD_ID, in case when this feature is provided by kernel. DowntimeContext is incapsulated inside migration.c. Signed-off-by: Alexey Perevalov --- include/migration/migration.h | 12 migration/migration.c | 33

[Qemu-devel] [PATCH RESEND V3 0/6] calculate downtime for postcopy live migration

2017-04-27 Thread Alexey Perevalov
motes/rth/tags/pull-tcg-20170426' into staging" It contains patch for kernel header, just for convinience of applying current patch set, for testing until kernel headers arn't synced. Alexey Perevalov (6): userfault: add pid into uffd_msg & update UFFD_FEATURE_* migration: pass pt

[Qemu-devel] [PATCH RESEND V3 4/6] migration: add postcopy downtime into MigrationIncommingState

2017-04-27 Thread Alexey Perevalov
This patch add request to kernel space for UFFD_FEATURE_THREAD_ID, in case when this feature is provided by kernel. DowntimeContext is incapsulated inside migration.c. Signed-off-by: Alexey Perevalov --- include/migration/migration.h | 12 migration/migration.c | 33

[Qemu-devel] [PATCH RESEND V3 3/6] migration: split ufd_version_check onto receive/request features part

2017-04-27 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 --- migratio

[Qemu-devel] [PATCH RESEND V3 5/6] migration: calculate downtime on dst side

2017-04-27 Thread Alexey Perevalov
field of MigrationIncomingState wasn't initialized. Signed-off-by: Alexey Perevalov --- include/migration/migration.h | 3 ++ migration/migration.c | 103 ++ migration/postcopy-ram.c | 20 +++- migration/trace-events| 6 +

[Qemu-devel] [PATCH RESEND V3 2/6] migration: pass ptr to MigrationIncomingState into migration ufd_version_check & postcopy_ram_supported_by_host

2017-04-28 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 --- include/migration/postcopy-ram.h | 2 +- migration/migration.c| 2

[Qemu-devel] [PATCH RESEND V3 1/6] userfault: add pid into uffd_msg & update UFFD_FEATURE_*

2017-04-28 Thread Alexey Perevalov
This commit duplicates header of "userfaultfd: provide pid in userfault msg" into linux kernel. Signed-off-by: Alexey Perevalov --- linux-headers/linux/userfaultfd.h | 5 + 1 file changed, 5 insertions(+) diff --git a/linux-headers/linux/userfaultfd.h b/linux-headers/linux/use

[Qemu-devel] [PATCH RESEND V3 6/6] migration: trace postcopy total downtime

2017-04-28 Thread Alexey Perevalov
It's not possible to transmit it back to source host, due to RP protocol is not expandable. Signed-off-by: Alexey Perevalov --- migration/postcopy-ram.c | 2 ++ migration/trace-events | 1 + 2 files changed, 3 insertions(+) diff --git a/migration/postcopy-ram.c b/migration/postcopy-

Re: [Qemu-devel] [PATCH RESEND V3 4/6] migration: add postcopy downtime into MigrationIncommingState

2017-04-28 Thread Alexey Perevalov
On 04/28/2017 12:38 PM, Peter Xu wrote: On Fri, Apr 28, 2017 at 09:57:36AM +0300, Alexey Perevalov wrote: This patch add request to kernel space for UFFD_FEATURE_THREAD_ID, in case when this feature is provided by kernel. DowntimeContext is incapsulated inside migration.c. Signed-off-by

Re: [Qemu-devel] [PATCH RESEND V3 3/6] migration: split ufd_version_check onto receive/request features part

2017-04-28 Thread Alexey Perevalov
On 04/28/2017 12:01 PM, Peter Xu wrote: On Fri, Apr 28, 2017 at 09:57:35AM +0300, Alexey Perevalov wrote: 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, whi

Re: [Qemu-devel] [PATCH RESEND V3 5/6] migration: calculate downtime on dst side

2017-04-28 Thread Alexey Perevalov
On 04/28/2017 01:00 PM, Peter Xu wrote: On Fri, Apr 28, 2017 at 09:57:37AM +0300, Alexey Perevalov wrote: This patch provides downtime 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 RESEND V3 3/6] migration: split ufd_version_check onto receive/request features part

2017-04-28 Thread Alexey Perevalov
On 04/28/2017 01:58 PM, Alexey Perevalov wrote: On 04/28/2017 12:01 PM, Peter Xu wrote: On Fri, Apr 28, 2017 at 09:57:35AM +0300, Alexey Perevalov wrote: This modification is necessary for userfault fd features which are required to be requested from userspace. UFFD_FEATURE_THREAD_ID is a one

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

2017-09-01 Thread Alexey Perevalov
| 1 + migration/savevm.c| 13 ++ migration/trace-events| 6 + tests/vhost-user-bridge.c | 1 + trace-events | 3 + vl.c | 2 + 20 files changed, 1241 insertions(+), 89 deletions(-) -- Best regards, Alexey Perevalov

[Qemu-devel] [PATCH v12 5/6] migration: add blocktime calculation into migration-test

2017-10-30 Thread Alexey Perevalov
This patch just requests blocktime calculation, and check it in case when UFFD_FEATURE_THREAD_ID feature is set on the host. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Alexey Perevalov --- tests/migration-test.c | 16 1 file changed, 16 insertions(+) diff --git a

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

2017-10-30 Thread Alexey Perevalov
Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Alexey Perevalov --- docs/devel/migration.txt | 13 + 1 file changed, 13 insertions(+) diff --git a/docs/devel/migration.txt b/docs/devel/migration.txt index 4030703..cebfe7a 100644 --- a/docs/devel/migration.txt +++ b/docs/devel

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

2017-10-30 Thread Alexey Perevalov
hen kernel supports it - It doesn't send back the downtime, just trace it Patch set is based on commit 3be480ebb8fdcc99f0a4fcbbf36ec5642a16a10b and Juan Quintela's series "tests: Add migration compress threads tests" Alexey Perevalov (6): migration: introduce postcopy-blockt

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

2017-10-30 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: A

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

2017-10-30 Thread Alexey Perevalov
Right now it could be used on destination side to enable vCPU blocktime calculation for postcopy live migration. vCPU blocktime - it's time since vCPU thread was put into interruptible sleep, till memory page was copied and thread awake. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: A

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

2017-10-30 Thread Alexey Perevalov
uot;, \"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 Signed-off-by: Alexey Perevalov --- migration/migration.h| 8 +++ migration/postcopy-ram.c | 59 +++

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

2017-10-30 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 Signed-off-by: Al

Re: [Qemu-devel] [PATCH v4] migration: change blocktime type to uint32_t

2018-03-12 Thread Alexey Perevalov
On 03/08/2018 03:59 PM, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: Initially int64_t was used, but on PowerPC architecture, clang doesn't have atomic_*_8 function, so it produces link time error. QEMU is working with time as with 64bit value, but by

[Qemu-devel] [PATCH v1 0/6] postcopy block time calculation + ppc32 build fix

2018-03-13 Thread Alexey Perevalov
MigrationIncomingState migration: calculate vCPU blocktime on dst side migration: add postcopy total blocktime into query-migrate based on commit 12c06d6f967a63515399b9e1f6a40f5ce871a8b7 Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging Alexey Perevalov (6):

[Qemu-devel] [PATCH v1 5/6] migration: add blocktime calculation into migration-test

2018-03-13 Thread Alexey Perevalov
This patch just requests blocktime calculation, and check it in case when UFFD_FEATURE_THREAD_ID feature is set on the host. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Alexey Perevalov Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- tests/migration-test.c | 16

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

2018-03-13 Thread Alexey Perevalov
\"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 Signed-off-by: Alexey Perevalov Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/migration.h

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

2018-03-13 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: A

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

2018-03-13 Thread Alexey Perevalov
Right now it could be used on destination side to enable vCPU blocktime calculation for postcopy live migration. vCPU blocktime - it's time since vCPU thread was put into interruptible sleep, till memory page was copied and thread awake. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: A

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

2018-03-13 Thread Alexey Perevalov
Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Alexey Perevalov Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- docs/devel/migration.rst | 14 ++ 1 file changed, 14 insertions(+) diff --git a/docs/devel/migration.rst b/docs/devel/migration.rst index 9d1b765

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

2018-03-13 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 Signed-off-by: Alexey

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

2018-01-05 Thread Alexey Perevalov
On 01/03/2018 12:20 AM, Eric Blake wrote: On 10/30/2017 08:16 AM, Alexey Perevalov wrote: Right now it could be used on destination side to enable vCPU blocktime calculation for postcopy live migration. vCPU blocktime - it's time since vCPU thread was put into interruptible sleep, till m

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

2018-01-05 Thread Alexey Perevalov
On 01/03/2018 12:26 AM, Eric Blake wrote: On 10/30/2017 08:16 AM, Alexey Perevalov 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 to see postcopy

Re: [Qemu-devel] [PULL 00/14] Migration pull request

2018-01-09 Thread Alexey Perevalov
On 01/05/2018 12:59 PM, Juan Quintela wrote: Eric Blake wrote: On 01/03/2018 03:38 AM, Juan Quintela wrote: Hi This are the changes for migration that are already reviewed. Please, apply. Alexey Perevalov (6): migration: introduce postcopy-blocktime capability migration: add

[Qemu-devel] [PATCH v3] Fix build on ppc platform in migration/postcopy-ram.c

2018-02-16 Thread Alexey Perevalov
and in Ubuntu16.04 on i386. This commit is based on commit ee264eb32c14f076c964fc34ee66f6f95cce2080 "Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.12-20180121' into staging" Alexey Perevalov (1): migration: change blocktime type to uint32_t hmp

[Qemu-devel] [PATCH v3] migration: change blocktime type to uint32_t

2018-02-16 Thread Alexey Perevalov
igned-off-by: Alexey Perevalov Acked-by: Eric Blake --- hmp.c| 4 ++-- migration/postcopy-ram.c | 48 +++- migration/trace-events | 4 ++-- qapi/migration.json | 4 ++-- 4 files changed, 33 insertions(+), 27 deletions(-)

[Qemu-devel] [PATCH v4] migration: change blocktime type to uint32_t

2018-02-22 Thread Alexey Perevalov
igned-off-by: Alexey Perevalov Acked-by: Eric Blake --- hmp.c| 4 ++-- migration/postcopy-ram.c | 52 migration/trace-events | 4 ++-- qapi/migration.json | 4 ++-- 4 files changed, 36 insertions(+), 28 deletions(-)

[Qemu-devel] [PATCH v4] Fix build on ppc platform in migration/postcopy-ram.c

2018-02-22 Thread Alexey Perevalov
taging but with all necessary commit reverted in ee86981bda9ecd40c8daf81b7307b1d2aff68174 Alexey Perevalov (1): migration: change blocktime type to uint32_t hmp.c| 4 ++-- migration/postcopy-ram.c | 52 migration/trace-event

[Qemu-devel] [PATCH v2 5/6] migration: add blocktime calculation into migration-test

2018-03-22 Thread Alexey Perevalov
This patch just requests blocktime calculation, and check it in case when UFFD_FEATURE_THREAD_ID feature is set on the host. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Alexey Perevalov Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- tests/migration-test.c | 16

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

2018-03-22 Thread Alexey Perevalov
Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Alexey Perevalov Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- docs/devel/migration.rst | 14 ++ 1 file changed, 14 insertions(+) diff --git a/docs/devel/migration.rst b/docs/devel/migration.rst index e32b087

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

2018-03-22 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: A

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

2018-03-22 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 Signed-off-by: Alexey

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

2018-03-22 Thread Alexey Perevalov
Right now it could be used on destination side to enable vCPU blocktime calculation for postcopy live migration. vCPU blocktime - it's time since vCPU thread was put into interruptible sleep, till memory page was copied and thread awake. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: A

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

2018-03-22 Thread Alexey Perevalov
\"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 Signed-off-by: Alexey Perevalov Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/migration.h

[Qemu-devel] [PATCH v2 0/6] postcopy block time calculation + ppc32 build fix

2018-03-22 Thread Alexey Perevalov
"hw/rdma: Implementation of PVRDMA device" Alexey Perevalov (6): migration: introduce postcopy-blocktime capability migration: add postcopy blocktime ctx into MigrationIncomingState migration: calculate vCPU blocktime on dst side migration: postcopy_blocktime documentation migr

<    1   2   3