qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org,
	pbonzini@redhat.com, armbru@redhat.com, eblake@redhat.com,
	famz@redhat.com, stefanha@redhat.com, amit.shah@redhat.com,
	quintela@redhat.com, mreitz@redhat.com, kwolf@redhat.com,
	peter.maydell@linaro.org, den@openvz.org, jsnow@redhat.com,
	lirans@il.ibm.com
Subject: Re: [Qemu-devel] [PATCH v10 10/12] migration: add postcopy migration of dirty bitmaps
Date: Tue, 13 Mar 2018 18:02:38 +0000	[thread overview]
Message-ID: <20180313180237.GJ3545@work-vm> (raw)
In-Reply-To: <e4883029-31b5-2b09-8ac3-186b04ce6075@virtuozzo.com>

* Vladimir Sementsov-Ogievskiy (vsementsov@virtuozzo.com) wrote:
> 12.03.2018 19:09, Dr. David Alan Gilbert wrote:
> > * Vladimir Sementsov-Ogievskiy (vsementsov@virtuozzo.com) wrote:
> > > Postcopy migration of dirty bitmaps. Only named dirty bitmaps are migrated.
> > > 
> > > +
> > > +        init_dirty_bitmap_incoming_migration();
> > > +
> > You might want to consider if that's better in vl.c near where
> > ram_mig_init() is, OR whether there should be a call in
> > migratation_incoming_state_destroy to clean it up.
> > (Although I doubt the cases where the destroy happens are interesting
> > for postcopy bitmaps).
> 
> If you don't mind, let's leave it as is for now

Yep, that's OK.

Dave

> > 
> > >           once = true;
> > >       }
> > >       return &mis_current;
> > > @@ -297,6 +300,8 @@ static void process_incoming_migration_bh(void *opaque)
> > >          state, we need to obey autostart. Any other state is set with
> > >          runstate_set. */
> > > +    dirty_bitmap_mig_before_vm_start();
> > > +
> > >       if (!global_state_received() ||
> > >           global_state_get_runstate() == RUN_STATE_RUNNING) {
> > >           if (autostart) {
> > > diff --git a/migration/savevm.c b/migration/savevm.c
> > > index e5d557458e..93b339646b 100644
> > > --- a/migration/savevm.c
> > > +++ b/migration/savevm.c
> > > @@ -1673,6 +1673,8 @@ static void loadvm_postcopy_handle_run_bh(void *opaque)
> > >       trace_loadvm_postcopy_handle_run_vmstart();
> > > +    dirty_bitmap_mig_before_vm_start();
> > > +
> > >       if (autostart) {
> > >           /* Hold onto your hats, starting the CPU */
> > >           vm_start();
> > > diff --git a/vl.c b/vl.c
> > > index e517a8d995..0ef3f2b5a2 100644
> > > --- a/vl.c
> > > +++ b/vl.c
> > > @@ -4514,6 +4514,7 @@ int main(int argc, char **argv, char **envp)
> > >       blk_mig_init();
> > >       ram_mig_init();
> > > +    dirty_bitmap_mig_init();
> > >       /* If the currently selected machine wishes to override the units-per-bus
> > >        * property of its default HBA interface type, do so now. */
> > > diff --git a/migration/Makefile.objs b/migration/Makefile.objs
> > > index 99e038024d..c83ec47ba8 100644
> > > --- a/migration/Makefile.objs
> > > +++ b/migration/Makefile.objs
> > > @@ -6,6 +6,7 @@ common-obj-y += qemu-file.o global_state.o
> > >   common-obj-y += qemu-file-channel.o
> > >   common-obj-y += xbzrle.o postcopy-ram.o
> > >   common-obj-y += qjson.o
> > > +common-obj-y += block-dirty-bitmap.o
> > >   common-obj-$(CONFIG_RDMA) += rdma.o
> > > diff --git a/migration/trace-events b/migration/trace-events
> > > index a04fffb877..e9eb8078d4 100644
> > > --- a/migration/trace-events
> > > +++ b/migration/trace-events
> > > @@ -227,3 +227,17 @@ colo_vm_state_change(const char *old, const char *new) "Change '%s' => '%s'"
> > >   colo_send_message(const char *msg) "Send '%s' message"
> > >   colo_receive_message(const char *msg) "Receive '%s' message"
> > >   colo_failover_set_state(const char *new_state) "new state %s"
> > > +
> > > +# migration/block-dirty-bitmap.c
> > > +send_bitmap_header_enter(void) ""
> > > +send_bitmap_bits(uint32_t flags, uint64_t start_sector, uint32_t nr_sectors, uint64_t data_size) "\n   flags:        0x%x\n   start_sector: %" PRIu64 "\n   nr_sectors:   %" PRIu32 "\n   data_size:    %" PRIu64 "\n"
> > Tracing doesn't have \n's in
> 
> will fix.
> 
> > 
> > > +dirty_bitmap_save_iterate(int in_postcopy) "in postcopy: %d"
> > > +dirty_bitmap_save_complete_enter(void) ""
> > > +dirty_bitmap_save_complete_finish(void) ""
> > > +dirty_bitmap_save_pending(uint64_t pending, uint64_t max_size) "pending %" PRIu64 " max: %" PRIu64
> > > +dirty_bitmap_load_complete(void) ""
> > > +dirty_bitmap_load_bits_enter(uint64_t first_sector, uint32_t nr_sectors) "chunk: %" PRIu64 " %" PRIu32
> > > +dirty_bitmap_load_bits_zeroes(void) ""
> > > +dirty_bitmap_load_header(uint32_t flags) "flags 0x%x"
> > > +dirty_bitmap_load_enter(void) ""
> > > +dirty_bitmap_load_success(void) ""
> > So other than minor bits, this one looks OK from a migration side; I
> > can't say I've followed the block side of the patch though.
> > 
> > Dave
> > 
> > > -- 
> > > 2.11.1
> > > 
> > --
> > Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
> 
> 
> -- 
> Best regards,
> Vladimir
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

  reply	other threads:[~2018-03-13 18:03 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-07 15:58 [Qemu-devel] [PATCH v10 00/12] Dirty bitmaps postcopy migration Vladimir Sementsov-Ogievskiy
2018-02-07 15:58 ` [Qemu-devel] [PATCH v10 01/12] block/dirty-bitmap: add bdrv_dirty_bitmap_enable_successor() Vladimir Sementsov-Ogievskiy
2018-02-07 15:58 ` [Qemu-devel] [PATCH v10 02/12] block/dirty-bitmap: fix locking in bdrv_reclaim_dirty_bitmap Vladimir Sementsov-Ogievskiy
2018-02-07 15:58 ` [Qemu-devel] [PATCH v10 03/12] block/dirty-bitmap: add _locked version of bdrv_reclaim_dirty_bitmap Vladimir Sementsov-Ogievskiy
2018-02-07 15:58 ` [Qemu-devel] [PATCH v10 04/12] dirty-bitmap: add locked state Vladimir Sementsov-Ogievskiy
2018-02-07 15:58 ` [Qemu-devel] [PATCH v10 05/12] migration: introduce postcopy-only pending Vladimir Sementsov-Ogievskiy
2018-03-12 15:30   ` Dr. David Alan Gilbert
2018-03-13  5:38     ` John Snow
2018-03-13 12:17       ` Dr. David Alan Gilbert
2018-03-13  7:47     ` Vladimir Sementsov-Ogievskiy
2018-03-13 10:30       ` Dr. David Alan Gilbert
2018-03-13 13:11         ` Vladimir Sementsov-Ogievskiy
2018-03-13 13:32           ` Vladimir Sementsov-Ogievskiy
2018-03-13 15:35           ` Dr. David Alan Gilbert
2018-03-13 16:14             ` Vladimir Sementsov-Ogievskiy
2018-03-13 16:16               ` John Snow
2018-03-13 16:33                 ` Vladimir Sementsov-Ogievskiy
2018-03-13 17:10                   ` John Snow
2018-02-07 15:58 ` [Qemu-devel] [PATCH v10 06/12] qapi: add dirty-bitmaps migration capability Vladimir Sementsov-Ogievskiy
2018-02-07 15:58 ` [Qemu-devel] [PATCH v10 07/12] migration: include migrate_dirty_bitmaps in migrate_postcopy Vladimir Sementsov-Ogievskiy
2018-02-07 15:58 ` [Qemu-devel] [PATCH v10 08/12] migration/qemu-file: add qemu_put_counted_string() Vladimir Sementsov-Ogievskiy
2018-02-07 15:58 ` [Qemu-devel] [PATCH v10 09/12] migration: add is_active_iterate handler Vladimir Sementsov-Ogievskiy
2018-02-07 15:58 ` [Qemu-devel] [PATCH v10 10/12] migration: add postcopy migration of dirty bitmaps Vladimir Sementsov-Ogievskiy
2018-03-12 16:09   ` Dr. David Alan Gilbert
2018-03-13 16:59     ` Vladimir Sementsov-Ogievskiy
2018-03-13 18:02       ` Dr. David Alan Gilbert [this message]
2018-02-07 15:58 ` [Qemu-devel] [PATCH v10 11/12] iotests: add dirty bitmap migration test Vladimir Sementsov-Ogievskiy
2018-03-12 16:19   ` Dr. David Alan Gilbert
2018-02-07 15:58 ` [Qemu-devel] [PATCH v10 12/12] iotests: add dirty bitmap postcopy test Vladimir Sementsov-Ogievskiy
2018-03-12 16:24   ` Dr. David Alan Gilbert
2018-02-15  9:38 ` [Qemu-devel] ping Re: [PATCH v10 00/12] Dirty bitmaps postcopy migration Vladimir Sementsov-Ogievskiy
2018-02-16 15:03 ` [Qemu-devel] " Vladimir Sementsov-Ogievskiy
2018-03-02 13:05 ` [Qemu-devel] ping " Vladimir Sementsov-Ogievskiy

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=20180313180237.GJ3545@work-vm \
    --to=dgilbert@redhat.com \
    --cc=amit.shah@redhat.com \
    --cc=armbru@redhat.com \
    --cc=den@openvz.org \
    --cc=eblake@redhat.com \
    --cc=famz@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lirans@il.ibm.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=vsementsov@virtuozzo.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).