qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Alexey Perevalov <a.perevalov@samsung.com>
Cc: qemu-devel@nongnu.org, peterx@redhat.com, i.maximets@samsung.com,
	quintela@redhat.com
Subject: Re: [Qemu-devel] [PATCH v9 0/8] calculate blocktime for postcopy live migration
Date: Mon, 18 Sep 2017 16:52:33 +0100	[thread overview]
Message-ID: <20170918155232.GK2581@work-vm> (raw)
In-Reply-To: <007210a5-de47-e873-7f23-63e052cbcbcd@samsung.com>

* Alexey Perevalov (a.perevalov@samsung.com) wrote:
> On 09/18/2017 02:15 PM, Dr. David Alan Gilbert wrote:
> > * Alexey Perevalov (a.perevalov@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 a value -
> > > time interval since source turn vCPU off, till destination start runnig
> > > vCPU. But that value was proper value for precopy migration it really shows
> > > amount of time when vCPU is down. But not for postcopy migration, because
> > > several vCPU threads could susppend after vCPU was started. That is important
> > > to estimate packet drop for SDN software.
> > Hi Alexey,
> >    I see that the UFFD_FEATURE_THREAD_ID has landed in kernel v4.14-rc1
> > over the weekend, so it's probably time to reheat this patchset.
> > 
> >    I think you should be able to generate a first patch by running
> >    scripts/update-linux-headers.sh
> Hi David,
> ok, I'll resend it tomorrow,
> I also added set capability postcopy-blocktime into tests/postcopy-test.c,
> but I don't check the result of the qmp there,
> I added it just to enable and test code path, is it ok for you?

It'd be better if you just ready the value in the test via qmp; that
would mean it'd be a basic check it was OK, and should be pretty
easy to glue into postcopy-test.c

Dave

> > 
> > Dave
> > 
> > > (V8 -> V9)
> > >      - rebase
> > >      - traces
> > > 
> > > (V7 -> V8)
> > >      - just one comma in
> > > "migration: fix hardcoded function name in error report"
> > > It was really missed, but fixed in futher patch.
> > > 
> > > (V6 -> V7)
> > >      - copied bitmap was placed into RAMBlock as another migration
> > > related bitmaps.
> > >      - Ordering of mark_postcopy_blocktime_end call and ordering
> > > of checking copied bitmap were changed.
> > >      - linewrap style defects
> > >      - new patch "postcopy_place_page factoring out"
> > >      - postcopy_ram_supported_by_host accepts
> > > MigrationIncomingState in qmp_migrate_set_capabilities
> > >      - minor fixes of documentation.
> > >      and huge description of get_postcopy_total_blocktime was
> > > moved. Davids comment.
> > > 
> > > (V5 -> V6)
> > >      - blocktime was added into hmp command. Comment from David.
> > >      - bitmap for copied pages was added as well as check in *_begin/_end
> > > functions. Patch uses just introduced RAMBLOCK_FOREACH. Comment from David.
> > >      - description of receive_ufd_features/request_ufd_features. Comment from David.
> > >      - commit message headers/@since references were modified. Comment from Eric.
> > >      - also typos in documentation. Comment from Eric.
> > >      - style and description of field in MigrationInfo. Comment from Eric.
> > >      - ufd_check_and_apply (former ufd_version_check) is calling twice,
> > > so my previous patch contained double allocation of blocktime context and
> > > as a result memory leak. In this patch series it was fixed.
> > > 
> > > (V4 -> V5)
> > >      - fill_destination_postcopy_migration_info empty stub was missed for none linux
> > > build
> > > 
> > > (V3 -> V4)
> > >      - get rid of Downtime as a name for vCPU waiting time during postcopy migration
> > >      - PostcopyBlocktimeContext renamed (it was just BlocktimeContext)
> > >      - atomic operations are used for dealing with fields of PostcopyBlocktimeContext
> > > affected in both threads.
> > >      - hardcoded function names in error_report were replaced to %s and __line__
> > >      - this patch set includes postcopy-downtime capability, but it used on
> > > destination, coupled with not possibility to return calculated downtime back
> > > to source to show it in query-migrate, it looks like a big trade off
> > >      - UFFD_API have to be sent notwithstanding need or not to ask kernel
> > > for a feature, due to kernel expects it in any case (see patch comment)
> > >      - postcopy_downtime included into query-migrate output
> > >      - also this patch set includes trivial fix
> > > migration: fix hardcoded function name in error report
> > > maybe that is a candidate for qemu-trivial mailing list, but I already
> > > sent "migration: Fixed code style" and it was unclaimed.
> > > 
> > > (V2 -> V3)
> > >      - Downtime calculation approach was changed, thanks to Peter Xu
> > >      - Due to previous point no more need to keep GTree as well as bitmap of cpus.
> > > So glib changes aren't included in this patch set, it could be resent in
> > > another patch set, if it will be a good reason for it.
> > >      - No procfs traces in this patchset, if somebody wants it, you could get it
> > > from patchwork site to track down page fault initiators.
> > >      - UFFD_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 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 MigrationIncomingState* into migration check functions
> > >    migration: fix hardcoded function name in error report
> > >    migration: split ufd_version_check onto receive/request features part
> > >    migration: introduce postcopy-blocktime capability
> > >    migration: add postcopy blocktime ctx into MigrationIncomingState
> > >    migration: calculate vCPU blocktime on dst side
> > >    migration: postcopy_blocktime documentation
> > > 
> > >   docs/devel/migration.txt          |  10 ++
> > >   linux-headers/linux/userfaultfd.h |   4 +
> > >   migration/migration.c             |  12 +-
> > >   migration/migration.h             |   9 ++
> > >   migration/postcopy-ram.c          | 300 ++++++++++++++++++++++++++++++++++++--
> > >   migration/postcopy-ram.h          |   2 +-
> > >   migration/savevm.c                |   2 +-
> > >   migration/trace-events            |   5 +-
> > >   qapi-schema.json                  |   5 +-
> > >   9 files changed, 334 insertions(+), 15 deletions(-)
> > > 
> > > -- 
> > > 1.8.3.1
> > > 
> > --
> > Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
> > 
> > 
> > 
> 
> -- 
> Best regards,
> Alexey Perevalov
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

      reply	other threads:[~2017-09-18 15:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170616191218eucas1p2bcc5ece2b03593f16ab599c4f12eaa5e@eucas1p2.samsung.com>
2017-06-16 19:11 ` [Qemu-devel] [PATCH v9 0/8] calculate blocktime for postcopy live migration Alexey Perevalov
     [not found]   ` <CGME20170616191219eucas1p197a274ce1b480821ac4813cde42aeb74@eucas1p1.samsung.com>
2017-06-16 19:11     ` [Qemu-devel] [PATCH v9 1/8] userfault: add pid into uffd_msg & update UFFD_FEATURE_* Alexey Perevalov
     [not found]   ` <CGME20170616191220eucas1p2ac6347288c68b20113882eaa38f34d5f@eucas1p2.samsung.com>
2017-06-16 19:11     ` [Qemu-devel] [PATCH v9 2/8] migration: pass MigrationIncomingState* into migration check functions Alexey Perevalov
     [not found]   ` <CGME20170616191221eucas1p18f1b21abee06f0a34c2a8eb5fb0c6004@eucas1p1.samsung.com>
2017-06-16 19:12     ` [Qemu-devel] [PATCH v9 3/8] migration: fix hardcoded function name in error report Alexey Perevalov
     [not found]   ` <CGME20170616191222eucas1p2fc88d38fb9f84f7da04d853811dd07db@eucas1p2.samsung.com>
2017-06-16 19:12     ` [Qemu-devel] [PATCH v9 4/8] migration: split ufd_version_check onto receive/request features part Alexey Perevalov
     [not found]   ` <CGME20170616191222eucas1p186aab01cb769c9c2f7a1b61be48cd9a2@eucas1p1.samsung.com>
2017-06-16 19:12     ` [Qemu-devel] [PATCH v9 5/8] migration: introduce postcopy-blocktime capability Alexey Perevalov
     [not found]   ` <CGME20170616191223eucas1p26f48ecbb0f533561e9c43bbac1da3e04@eucas1p2.samsung.com>
2017-06-16 19:12     ` [Qemu-devel] [PATCH v9 6/8] migration: add postcopy blocktime ctx into MigrationIncomingState Alexey Perevalov
     [not found]   ` <CGME20170616191223eucas1p14025ca2f7c70d0edcad51f05458e0d9c@eucas1p1.samsung.com>
2017-06-16 19:12     ` [Qemu-devel] [PATCH v9 7/8] migration: calculate vCPU blocktime on dst side Alexey Perevalov
     [not found]   ` <CGME20170616191224eucas1p2e8c1ff33f630b6beaff096b73ab3462b@eucas1p2.samsung.com>
2017-06-16 19:12     ` [Qemu-devel] [PATCH v9 8/8] migration: postcopy_blocktime documentation Alexey Perevalov
2017-09-18 11:15   ` [Qemu-devel] [PATCH v9 0/8] calculate blocktime for postcopy live migration Dr. David Alan Gilbert
2017-09-18 15:23     ` Alexey Perevalov
2017-09-18 15:52       ` Dr. David Alan Gilbert [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170918155232.GK2581@work-vm \
    --to=dgilbert@redhat.com \
    --cc=a.perevalov@samsung.com \
    --cc=i.maximets@samsung.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).