Re: [Qemu-devel] [01/15] postcopy: Transmit and compare individual page sizes

2017-01-25 Thread Alexey Perevalov
remote_page_size); +ret = -EINVAL; +} +} ram_control_load_hook(f, RAM_CONTROL_BLOCK_REG, block->idstr); } else { -- Best regards, Alexey Perevalov

Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support

2017-02-20 Thread Alexey Perevalov
Hello Andrea, On Fri, Feb 17, 2017 at 05:47:30PM +0100, Andrea Arcangeli wrote: > Hello Alexey, > > On Tue, Feb 14, 2017 at 05:48:25PM +0300, Alexey Perevalov wrote: > > On Mon, Feb 13, 2017 at 06:57:22PM +0100, Andrea Arcangeli wrote: > > > Hello, > > > &g

Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support

2017-02-20 Thread Alexey Perevalov
Hello David, On Tue, Feb 14, 2017 at 07:34:26PM +, Dr. David Alan Gilbert wrote: > * Alexey Perevalov (a.pereva...@samsung.com) wrote: > > Hi David, > > > > Thank your, now it's clear. > > > > On Mon, Feb 13, 2017 at 06:16:02PM +, Dr. David Alan Gilber

Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support

2017-02-13 Thread Alexey Perevalov
Hello David! I have checked you series with 1G hugepage, but only in 1 Gbit/sec network environment. I started Ubuntu just with console interface and gave to it only 1G of RAM, inside Ubuntu I started stress command (stress --cpu 4 --io 4 --vm 4 --vm-bytes 25600 &) in such environment

Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support

2017-02-27 Thread Alexey Perevalov
Hi David, On Tue, Feb 21, 2017 at 10:03:14AM +, Dr. David Alan Gilbert wrote: > * Alexey Perevalov (a.pereva...@samsung.com) wrote: > > > > Hello David, > > Hi Alexey, > > > On Tue, Feb 14, 2017 at 07:34:26PM +, Dr. David Alan Gilbert wrote: >

Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support

2017-02-27 Thread Alexey Perevalov
On 02/27/2017 02:26 PM, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: Hi David, On Tue, Feb 21, 2017 at 10:03:14AM +, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: Hello David, Hi Alexey, On Tue, Feb 14, 2017

[Qemu-devel] [PATCH 1/2] userfault: add pid into uffd_msg

2017-03-18 Thread Alexey Perevalov
Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- linux-headers/linux/userfaultfd.h | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-headers/linux/userfaultfd.h b/linux-headers/linux/userfaultfd.h index 2ed5dc3..7b299a2 100644 --- a/linux-headers/linux/userfaultfd.h

[Qemu-devel] [RFC PATCH 0/2] Calcuate downtime for postcopy live migration

2017-03-18 Thread Alexey Perevalov
read state. This patch is just for showing and idea, if you ok with this idea none RFC patch will not include proc access && a lot of traces. Also I think it worth to guard postcopy_downtime in MigrationIncomingState and return calculated downtime into src, where qeury-migration will be invocked.

[Qemu-devel] [PATCH 2/2] migration: calculate downtime on dst side

2017-03-18 Thread Alexey Perevalov
comment to get_postcopy_total_downtime function. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- include/migration/migration.h | 11 ++ migration/migration.c | 238 +- migration/postcopy-ram.c | 61 ++- migration/sa

Re: [Qemu-devel] Dual userfaultfd behavior

2017-03-15 Thread Alexey Perevalov
Hi Andrea, thank you for so perfect design description, the main question who will do RFC patches, you or Mike or if you not against I could try. On 03/14/2017 12:46 AM, Andrea Arcangeli wrote: Hello, On Mon, Mar 13, 2017 at 10:53:39AM +, Dr. David Alan Gilbert wrote: * Alexey Perevalov

Re: [Qemu-devel] Dual userfaultfd behavior

2017-04-10 Thread Alexey Perevalov
Hello, On 03/18/2017 02:27 AM, Mike Kravetz wrote: On 03/15/2017 06:47 AM, Alexey Perevalov wrote: Hi Andrea, thank you for so perfect design description, the main question who will do RFC patches, you or Mike or if you not against I could try. Sorry for not replying sooner, I have been

Re: [Qemu-devel] [RFC PATCH 0/2] Calcuate downtime for postcopy live migration

2017-04-05 Thread Alexey Perevalov
On 04/04/2017 10:06 PM, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: Hi David, I already asked you about downtime calculation for postcopy live migration. As I remember you said it's worth not to calculate it per vCPU or maybe I understood you incorrectly

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

2017-04-05 Thread Alexey Perevalov
On 04/04/2017 10:01 PM, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: This patch provides downtime calculation per vCPU, as a summary and as a overlapped value for all vCPUs. This approach just keeps tree with page fault addr as a key, and t1-t2 interval

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

2017-04-14 Thread Alexey Perevalov
Userfaultfd mechanism is able to provide process thread id, in case when client request it with UFDD_API ioctl. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- include/migration/postcopy-ram.h | 2 +- migration/migration.c| 2 +- migration/postcopy-ram.c

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

2017-04-14 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 0/6] calculate downtime for postcopy live migration

2017-04-14 Thread Alexey Perevalov
is commit 372b3fe0b2ecdd39ba850e31c0c6686315c507af. It contains kernel side pages, just for convinience of applying current patch set, for testing util kernel headers arn't synced. Alexey Perevalov (6): userfault: add pid into uffd_msg & update UFFD_FEATURE_* util: introduce glib-help

[Qemu-devel] [PATCH 5/6] migration: send postcopy downtime back to source

2017-04-14 Thread Alexey Perevalov
. For this purpose return path socket was shosen. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- include/migration/migration.h | 4 +++- migration/migration.c | 20 ++-- migration/postcopy-ram.c | 1 + 3 files changed, 22 insertions(+), 3 del

[Qemu-devel] [PATCH 6/6] migration: detailed traces for postcopy

2017-04-14 Thread Alexey Perevalov
It could help to track down vCPU state during page fault and page fault sources. This patch showes proc's status/stack/syscall file at the moment of pagefault, it's very interesting to know who was page fault initiator. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- mig

[Qemu-devel] [PATCH 2/6] util: introduce glib-helper.c

2017-04-14 Thread Alexey Perevalov
for consolidation purpose. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- hw/block/xen_disk.c| 10 +- include/glib-compat.h | 352 - include/glib/glib-compat.h | 352 + include/gli

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

2017-04-14 Thread Alexey Perevalov
comment to get_postcopy_total_downtime function. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- include/migration/migration.h | 14 +++ migration/migration.c | 280 +- migration/postcopy-ram.c | 24 +++- migration/qemu-

[Qemu-devel] Dual userfaultfd behavior

2017-03-10 Thread Alexey Perevalov
Hi, David, Andrea and Mike The problem I want to discuss it's 1G hugepage based VM and post copy live migration. I would like to know your opinion on following approach of avoiding such problem: Once we have mmap'ed area through 1G hugetlbfs, remap physical pages with /dev/mem. It will be 2

Re: [Qemu-devel] [PATCH 1/2] userfault: add pid into uffd_msg

2017-04-05 Thread Alexey Perevalov
On 04/04/2017 08:57 PM, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- linux-headers/linux/userfaultfd.h | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-headers/linux/userfaultf

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

2017-07-28 Thread Alexey Perevalov
On 07/28/2017 10:06 AM, Alexey Perevalov wrote: On 07/28/2017 09:57 AM, Peter Xu wrote: On Fri, Jul 28, 2017 at 09:43:28AM +0300, Alexey Perevalov wrote: On 07/28/2017 07:27 AM, Peter Xu wrote: On Thu, Jul 27, 2017 at 10:27:41AM +0300, Alexey Perevalov wrote: On 07/27/2017 05:35 AM, Peter Xu

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

2017-07-20 Thread Alexey Perevalov
is exists after remmap). Bitmap is placed into RAMBlock as another postcopy/precopy related bitmaps. Reviewed-by: Peter Xu <pet...@redhat.com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- include/exec/ram_addr.h | 10 ++ migration/postcop

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

2017-07-20 Thread Alexey Perevalov
t...@redhat.com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- migration/postcopy-ram.c | 34 +- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index 996e64d..be497b

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

2017-07-20 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 v8 0/3] Add bitmap for received pages in postcopy migration

2017-07-20 Thread Alexey Perevalov
ch 'remotes/jnsnow/tags/ide-pull-request' into staging" Alexey Perevalov (3): migration: postcopy_place_page factoring out migration: introduce qemu_ufd_copy_ioctl helper migration: add bitmap for received page include/exec/ram_addr.h

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

2017-07-27 Thread Alexey Perevalov
On 07/27/2017 05:35 AM, Peter Xu wrote: On Wed, Jul 26, 2017 at 06:24:11PM +0300, Alexey Perevalov wrote: On 07/26/2017 11:43 AM, Peter Xu wrote: On Wed, Jul 26, 2017 at 11:07:17AM +0300, Alexey Perevalov wrote: On 07/26/2017 04:49 AM, Peter Xu wrote: On Thu, Jul 20, 2017 at 09:52:34AM +0300

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

2017-07-28 Thread Alexey Perevalov
On 07/28/2017 09:57 AM, Peter Xu wrote: On Fri, Jul 28, 2017 at 09:43:28AM +0300, Alexey Perevalov wrote: On 07/28/2017 07:27 AM, Peter Xu wrote: On Thu, Jul 27, 2017 at 10:27:41AM +0300, Alexey Perevalov wrote: On 07/27/2017 05:35 AM, Peter Xu wrote: On Wed, Jul 26, 2017 at 06:24:11PM +0300

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

2017-07-28 Thread Alexey Perevalov
On 07/28/2017 07:27 AM, Peter Xu wrote: On Thu, Jul 27, 2017 at 10:27:41AM +0300, Alexey Perevalov wrote: On 07/27/2017 05:35 AM, Peter Xu wrote: On Wed, Jul 26, 2017 at 06:24:11PM +0300, Alexey Perevalov wrote: On 07/26/2017 11:43 AM, Peter Xu wrote: On Wed, Jul 26, 2017 at 11:07:17AM +0300

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

2017-07-26 Thread Alexey Perevalov
On 07/26/2017 04:49 AM, Peter Xu wrote: On Thu, Jul 20, 2017 at 09:52:34AM +0300, Alexey Perevalov 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

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

2017-07-26 Thread Alexey Perevalov
On 07/26/2017 11:43 AM, Peter Xu wrote: On Wed, Jul 26, 2017 at 11:07:17AM +0300, Alexey Perevalov wrote: On 07/26/2017 04:49 AM, Peter Xu wrote: On Thu, Jul 20, 2017 at 09:52:34AM +0300, Alexey Perevalov wrote: This patch adds ability to track down already received pages, it's necessary

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

2017-06-30 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 | 10 ++ migration/postcopy-ram.c | 16 +++- migration/ram.c

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

2017-06-30 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 v7 2/3] migration: introduce qemu_ufd_copy_ioctl helper

2017-06-30 Thread Alexey Perevalov
t...@redhat.com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- migration/postcopy-ram.c | 34 +- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index 996e64d..be497b

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

2017-06-28 Thread Alexey Perevalov
t...@redhat.com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- migration/postcopy-ram.c | 34 +- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index dae41b5..293db9

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

2017-06-28 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 v6 0/3] Add bitmap for received pages in postcopy migration

2017-06-28 Thread Alexey Perevalov
uot;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_ufd_copy_ioctl helper migration: add bitma

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

2017-06-28 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 | 10 ++ migration/migration.c| 1 + migration/postcopy-ram.c | 16 +++- migration

[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 <a.pereva...@samsung.com> --- include/migration/migration.h | 12 mig

[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 <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 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 <a.pereva..

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

2017-04-25 Thread Alexey Perevalov
nce 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_by_host migra

[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 <a.pereva...@samsung.com> --- include/migration/migration.h | 3 ++ migration/migration.c | 103 ++ migration/postcopy-ram.c | 20 +++- migration

[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 <a.pereva...@samsung.com> --- migration/postcopy-ram.c | 2 ++ migration/trace-events | 1 + 2 files changed, 3 insertions(+) diff --git a/migration/postcopy-r

[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 <a.pereva...@samsung.com> --- include/migration/postcopy-ram.h | 2 +- mig

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 approach

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

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

2017-04-25 Thread Alexey Perevalov
: On 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

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

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 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" feat

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

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

2017-04-28 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 <a.pereva...@samsung.com> --- include/migration/migration.h | 12 mig

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

2017-04-28 Thread Alexey Perevalov
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 ptr to MigrationIncomingSta

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

2017-04-28 Thread Alexey Perevalov
field of MigrationIncomingState wasn't initialized. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- include/migration/migration.h | 3 ++ migration/migration.c | 103 ++ migration/postcopy-ram.c | 20 +++- migration

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

2017-04-28 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 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 <a.pereva...@samsung.com> --- include/migration/postcopy-ram.h | 2 +- mig

[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 <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 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 <a.pereva...@samsung.com> --- migration/postcopy-ram.c | 2 ++ migration/trace-events | 1 + 2 files changed, 3 insertions(+) diff --git a/migration/postcopy-r

Re: [Qemu-devel] [RFC 23/29] vub+postcopy: madvises

2017-08-09 Thread Alexey Perevalov
On 08/08/2017 08:06 PM, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: On 06/28/2017 10:00 PM, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" <dgilb...@redhat.com> Clear the area and turn off THP. Signed-off-by: Dr. Da

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

2017-08-01 Thread Alexey Perevalov
is exists after remmap). Bitmap is placed into RAMBlock as another postcopy/precopy related bitmaps. Reviewed-by: Peter Xu <pet...@redhat.com> Signed-off-by: Peter Xu <pet...@redhat.com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- include/exec/ram_addr.h | 10 +++

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

2017-08-01 Thread Alexey Perevalov
here it will be necessary - releasing memory of receivedmap was added into ram_load_cleanup - new patch "migration: introduce qemu_ufd_copy_ioctl helper" Patchset is based on: commit 6d60e295ef020759a03b90724d0342012c189ba2 "Merge remote-tracking branch 'remotes/jnsnow/tags/ide-

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

2017-08-01 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 2/3] migration: introduce qemu_ufd_copy_ioctl helper

2017-08-01 Thread Alexey Perevalov
t...@redhat.com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- migration/postcopy-ram.c | 34 +- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index 996e64d..be497b

Re: [Qemu-devel] [RFC 01/29] migration: fix incorrect postcopy recved_bitmap

2017-07-31 Thread Alexey Perevalov
that I can rebase to. Thanks, I'll squash it, and I'll resend it today. Are you agree to add Signed-off-by: Peter Xu <pet...@redhat.com> to my patch? -- Best regards, Alexey Perevalov

Re: [Qemu-devel] [RFC 01/29] migration: fix incorrect postcopy recved_bitmap

2017-08-01 Thread Alexey Perevalov
On 08/01/2017 09:02 AM, Peter Xu wrote: On Tue, Aug 01, 2017 at 08:48:18AM +0300, Alexey Perevalov wrote: On 08/01/2017 05:11 AM, Peter Xu wrote: On Mon, Jul 31, 2017 at 05:34:14PM +0100, Dr. David Alan Gilbert wrote: * Peter Xu (pet...@redhat.com) wrote: The bitmap setup during postcopy

Re: [Qemu-devel] [RFC 23/29] vub+postcopy: madvises

2017-08-06 Thread Alexey Perevalov
ter reg_struct; /* Note: We might need to go back to using mmap_addr and * len + mmap_offset for * huge pages, but then we do hope not to -- Best regards, Alexey Perevalov

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

2017-05-12 Thread Alexey Perevalov
nux ifdef. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- migration/postcopy-ram.c | 87 +++- migration/trace-events | 5 ++- 2 files changed, 90 insertions(+), 2 deletions(-) diff --git a/migration/postcopy-ram.c b/migration/postc

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

2017-05-12 Thread Alexey Perevalov
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 fbccc53..b6eccaf 100644 --- a/migration/postcopy-ram.c +++ b/migration/po

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

2017-05-12 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 V4 4/9] migration: split ufd_version_check onto receive/request features part

2017-05-12 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 V4 0/9] calculate blocktime for postcopy live migration

2017-05-12 Thread Alexey Perevalov
t contains patch for kernel header, just for convinience of applying current patch set, for testing until kernel headers arn't synced. At the moment of posting this patch set, "userfaultfd: provide pid in userfault msg" wasn't yet merged into upstream. Alexey Perevalov (9): userfa

[Qemu-devel] [PATCH V4 5/9] migration: introduce postcopy-blocktime capability

2017-05-12 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. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.

[Qemu-devel] [PATCH V4 6/9] migration: add postcopy vcpu blocktime context into MigrationIncomingState

2017-05-12 Thread Alexey Perevalov
it [root@host]#printf "{\"execute\" : \"qmp_capabilities\"}\r\n \ {\"execute\": \"migrate-set-capabilities\" , \"arguments\": { \"capabilities\": [ { \"capability\": \"postcopy-blocktime\", \"state\": tr

[Qemu-devel] [PATCH V4 8/9] migration: add postcopy total blocktime into query-migrate

2017-05-12 Thread Alexey Perevalov
"status": "completed", "postcopy_blocktime": 100 }} postcopy_vcpu_blocktime contains list, where the first item is the first vCPU in QEMU. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- include/migration/migration.h | 4 +++ migration/migration.

[Qemu-devel] [PATCH V4 9/9] migration: postcopy_blocktime documentation

2017-05-12 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..d0f5a6d 100644 --- a/docs/migration.txt +++ b/docs/migration.txt @@ -402,6 +402,16 @@ wi

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

2017-05-12 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 V5 7/9] migration: calculate vCPU blocktime on dst side

2017-05-12 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 V5 5/9] migration: introduce postcopy-blocktime capability

2017-05-12 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. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.

[Qemu-devel] [PATCH V5 9/9] migration: postcopy_blocktime documentation

2017-05-12 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..d0f5a6d 100644 --- a/docs/migration.txt +++ b/docs/migration.txt @@ -402,6 +402,16 @@ wi

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

2017-05-12 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 V5 8/9] migration: add postcopy total blocktime into query-migrate

2017-05-12 Thread Alexey Perevalov
"status": "completed", "postcopy_blocktime": 100 }} postcopy_vcpu_blocktime contains list, where the first item is the first vCPU in QEMU. Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- include/migration/migration.h | 4 +++ migration/migratio

[Qemu-devel] [PATCH V5 6/9] migration: add postcopy vcpu blocktime context into MigrationIncomingState

2017-05-12 Thread Alexey Perevalov
it [root@host]#printf "{\"execute\" : \"qmp_capabilities\"}\r\n \ {\"execute\": \"migrate-set-capabilities\" , \"arguments\": { \"capabilities\": [ { \"capability\": \"postcopy-blocktime\", \"state\": tr

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

2017-05-12 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> --- include/migration/postcopy-ram.h | 2 +- mig

[Qemu-devel] [PATCH V5 0/9] calculate blocktime for postcopy live migration

2017-05-12 Thread Alexey Perevalov
ting this patch set, "userfaultfd: provide pid in userfault msg" wasn't yet merged into upstream. Alexey Perevalov (9): userfault: add pid into uffd_msg & update UFFD_FEATURE_* migration: pass ptr to MigrationIncomingState into migration ufd_version_check & postcopy_r

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

2017-05-12 Thread Alexey Perevalov
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 4c859b4..0f75700 100644 --- a/migration/postcopy-ram.c +++ b/migration/po

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

2017-05-12 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..

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

2017-06-09 Thread Alexey Perevalov
On 06/09/2017 07:10 AM, Peter Xu wrote: On Wed, Jun 07, 2017 at 12:46:29PM +0300, Alexey Perevalov 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 v8 02/11] migration: pass MigrationIncomingState* into migration check functions

2017-06-09 Thread Alexey Perevalov
On 06/09/2017 10:14 AM, Peter Xu wrote: On Fri, Jun 09, 2017 at 09:21:38AM +0300, Alexey Perevalov wrote: On 06/09/2017 07:10 AM, Peter Xu wrote: On Wed, Jun 07, 2017 at 12:46:29PM +0300, Alexey Perevalov wrote: That tiny refactoring is necessary to be able to set UFFD_FEATURE_THREAD_ID while

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

2017-06-09 Thread Alexey Perevalov
On 06/09/2017 09:06 AM, Peter Xu wrote: On Wed, Jun 07, 2017 at 05:13:00PM +0300, Alexey Perevalov wrote: 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

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

2017-06-26 Thread Alexey Perevalov
be necessary - releasing memory of receivedmap was added into ram_load_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): migrati

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

2017-06-26 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 v4 3/3] migration: add bitmap for received page

2017-06-26 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 | 10 migration/migration.c| 1 + migration/postcopy-ram.c | 20 migration

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

2017-06-26 Thread Alexey Perevalov
t...@redhat.com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- migration/postcopy-ram.c | 34 +- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index dae41b5..293db9

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

2017-06-27 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 | 10 ++ migration/migration.c| 1 + migration/postcopy-ram.c | 16 +++- migration

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

2017-06-27 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 v5 0/3] Add bitmap for received pages in postcopy migration

2017-06-27 Thread Alexey Perevalov
patch set where it will be necessary - releasing memory of receivedmap was added into ram_load_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

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

2017-06-27 Thread Alexey Perevalov
t...@redhat.com> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com> --- migration/postcopy-ram.c | 34 +- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index dae41b5..293db9

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

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

  1   2   3   >