From: Eduardo Habkost <ehabkost@redhat.com>
To: Yury Kotov <yury-kotov@yandex-team.ru>
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>,
Laurent Vivier <lvivier@redhat.com>,
Thomas Huth <thuth@redhat.com>,
Peter Crosthwaite <crosthwaite.peter@gmail.com>,
Juan Quintela <quintela@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Markus Armbruster <armbru@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Igor Mammedov <imammedo@redhat.com>,
"wrfsh@yandex-team.ru" <wrfsh@yandex-team.ru>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH 0/4] Add ignore-external migration capability
Date: Fri, 11 Jan 2019 18:55:16 -0200 [thread overview]
Message-ID: <20190111205516.GR4500@habkost.net> (raw)
In-Reply-To: <2578541547221793@myt5-68ad52a76c91.qloud-c.yandex.net>
On Fri, Jan 11, 2019 at 06:49:53PM +0300, Yury Kotov wrote:
> 10.01.2019, 23:12, "Dr. David Alan Gilbert" <dgilbert@redhat.com>:
> > * Yury Kotov (yury-kotov@yandex-team.ru) wrote:
> >> Hi,
> >>
> >> The series adds migration capability which allows to skip 'external' RAM blocks
> >> during migration. External block is a RAMBlock which available from the outside
> >> of current QEMU process (e.g. file in /dev/shm). It's useful for fast local
> >> migration to update QEMU for the running guests.
> >
> > Hi Yury,
> > There have been a few similar patch series around from people wanting
> > to do similar things.
> > In particular Lai Jiangshan's https://lists.nongnu.org/archive/html/qemu-devel/2018-03/msg07511.html
> > and Cédric Le Goater wanted to skip regions for a different reason.
> >
> > We merged some of Cédric's code last year so that we now
> > have the qemu_ram_is_migratable() function - and we should be reusing
> > that to skip things rather than adding a new check that we have to add
> > everywhere.
> >
>
> I didn't see the series, so I'll check it, thanks!
> But I saw qemu_ram_is_migratable() function and corresponding patch.
> It's very close to my needs, but it works a bit different IIUC:
> 1. Not migratable blocks isn't validated (existence and size) during migration,
> 2. "Migratable" state is determined during the block creation time.
> Such case isn't valid because of it:
> * Source has one migratable and one not migratable RAM blocks,
> * Target has the same (idstr) blocks, but both are not migratable.
> Thus, target will not expect pages for not migratable blocks.
>
> > Also, ypu're skipping 'external' things, I think the other suggestion
> > was to skip 'shared' things (i.e. anything with share=0); skipping
> > share=on cases sounds easier to me.
>
> I agree that introducing new term is a complication, but 'share' and 'external'
> terms have important differences (I'll describe it below).
>
> Just to clarify:
> * 'share' means that other processes has an access to such memory,
> * 'external' means file backed memory.
If you use file backed memory with share=off, writes are not
propagated to the file (they are mapped with MAP_PRIVATE). Would
you really want to skip file backed memory if it has share=off?
>
> There is another use case I wanted to support (I had to write about it in
> the cover letter, sorry..):
> 1. Migrate source VM to file and kill source,
> 2. Start target VM and migrate it from file.
> In such case source VM may have memory-backend-ram with share=off, it's ok.
>
> Thus, in the new migration capability I want to migrate memory that meets
> three conditions:
> 1. The source will not use the memory after migration ends,
> 2. The source may exit before target starts (migrate to file),
> 3. The target has an access to the memory.
>
> I think 'external' fits them better than 'share'.
>
In either case, defining "external" seems tricky. A memory
region might be backed by a file on tmpfs or hugetlbfs that was
deleted, which makes the file "internal" for practical purposes.
QEMU has no way to tell if (3) is really true.
--
Eduardo
next prev parent reply other threads:[~2019-01-11 20:55 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-10 12:01 [Qemu-devel] [PATCH 0/4] Add ignore-external migration capability Yury Kotov
2019-01-10 12:01 ` [Qemu-devel] [PATCH 1/4] migration: add RAMBlock's offset validation Yury Kotov
2019-01-10 20:14 ` Dr. David Alan Gilbert
2019-01-11 10:06 ` Igor Mammedov
2019-01-11 10:58 ` Dr. David Alan Gilbert
2019-01-11 16:38 ` Yury Kotov
2019-01-11 18:25 ` Dr. David Alan Gilbert
2019-01-14 12:58 ` Yury Kotov
2019-01-10 12:01 ` [Qemu-devel] [PATCH 2/4] exec: add RAM_EXTERNAL flag to mark non-QEMU allocated blocks Yury Kotov
2019-01-10 20:14 ` Dr. David Alan Gilbert
2019-01-10 12:01 ` [Qemu-devel] [PATCH 3/4] migration: introduce ignore-external capability Yury Kotov
2019-01-10 12:01 ` [Qemu-devel] [PATCH 4/4] tests/migration-test: Add a test for " Yury Kotov
2019-01-10 20:11 ` [Qemu-devel] [PATCH 0/4] Add ignore-external migration capability Dr. David Alan Gilbert
2019-01-11 15:49 ` Yury Kotov
2019-01-11 20:09 ` Dr. David Alan Gilbert
2019-01-14 15:16 ` Yury Kotov
2019-01-21 14:09 ` Yury Kotov
2019-01-22 18:08 ` Dr. David Alan Gilbert
2019-01-11 20:55 ` Eduardo Habkost [this message]
2019-01-14 15:31 ` Yury Kotov
2019-01-13 14:37 ` no-reply
2019-01-13 23:57 ` no-reply
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=20190111205516.GR4500@habkost.net \
--to=ehabkost@redhat.com \
--cc=armbru@redhat.com \
--cc=crosthwaite.peter@gmail.com \
--cc=dgilbert@redhat.com \
--cc=imammedo@redhat.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=rth@twiddle.net \
--cc=thuth@redhat.com \
--cc=wrfsh@yandex-team.ru \
--cc=yury-kotov@yandex-team.ru \
/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).