From: Peter Xu <peterx@redhat.com>
To: Alexey Perevalov <a.perevalov@samsung.com>
Cc: qemu-devel@nongnu.org, dgilbert@redhat.com,
i.maximets@samsung.com, f4bug@amsat.org
Subject: Re: [Qemu-devel] [PATCH RESEND V3 2/6] migration: pass ptr to MigrationIncomingState into migration ufd_version_check & postcopy_ram_supported_by_host
Date: Fri, 28 Apr 2017 17:04:05 +0800 [thread overview]
Message-ID: <20170428090405.GC24485@pxdev.xzpeter.org> (raw)
In-Reply-To: <1493362658-8179-3-git-send-email-a.perevalov@samsung.com>
On Fri, Apr 28, 2017 at 09:57:34AM +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-by: Alexey Perevalov <a.perevalov@samsung.com>
> ---
> include/migration/postcopy-ram.h | 2 +-
> migration/migration.c | 2 +-
> migration/postcopy-ram.c | 10 +++++-----
> migration/savevm.c | 2 +-
> 4 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/include/migration/postcopy-ram.h b/include/migration/postcopy-ram.h
> index 8e036b9..809f6db 100644
> --- a/include/migration/postcopy-ram.h
> +++ b/include/migration/postcopy-ram.h
> @@ -14,7 +14,7 @@
> #define QEMU_POSTCOPY_RAM_H
>
> /* Return true if the host supports everything we need to do postcopy-ram */
> -bool postcopy_ram_supported_by_host(void);
> +bool postcopy_ram_supported_by_host(MigrationIncomingState *mis);
>
> /*
> * Make all of RAM sensitive to accesses to areas that haven't yet been written
> diff --git a/migration/migration.c b/migration/migration.c
> index 353f272..569a7f6 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -804,7 +804,7 @@ void qmp_migrate_set_capabilities(MigrationCapabilityStatusList *params,
> * special support.
> */
> if (!old_postcopy_cap && runstate_check(RUN_STATE_INMIGRATE) &&
> - !postcopy_ram_supported_by_host()) {
> + !postcopy_ram_supported_by_host(NULL)) {
> /* postcopy_ram_supported_by_host will have emitted a more
> * detailed message
> */
> diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c
> index 85fd8d7..4c859b4 100644
> --- a/migration/postcopy-ram.c
> +++ b/migration/postcopy-ram.c
> @@ -60,7 +60,7 @@ struct PostcopyDiscardState {
> #include <sys/eventfd.h>
> #include <linux/userfaultfd.h>
>
> -static bool ufd_version_check(int ufd)
> +static bool ufd_version_check(int ufd, MigrationIncomingState *mis)
This patch is mostly passing the incoming state around. IMHO it'll be
nicer if we squash this patch into the one that really uses the state.
What do you think?
Thanks,
--
Peter Xu
next prev parent reply other threads:[~2017-04-28 9:04 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170428065752eucas1p1b702ff53ba0bd96674e8cc35466f8046@eucas1p1.samsung.com>
2017-04-28 6:57 ` [Qemu-devel] [PATCH RESEND V3 0/6] calculate downtime for postcopy live migration Alexey Perevalov
2017-04-28 6:57 ` [Qemu-devel] [PATCH RESEND V3 1/6] userfault: add pid into uffd_msg & update UFFD_FEATURE_* Alexey Perevalov
2017-04-28 6:57 ` [Qemu-devel] [PATCH RESEND V3 2/6] migration: pass ptr to MigrationIncomingState into migration ufd_version_check & postcopy_ram_supported_by_host Alexey Perevalov
2017-04-28 9:04 ` Peter Xu [this message]
2017-04-28 6:57 ` [Qemu-devel] [PATCH RESEND V3 3/6] migration: split ufd_version_check onto receive/request features part Alexey Perevalov
2017-04-28 9:01 ` Peter Xu
2017-04-28 10:58 ` Alexey Perevalov
2017-04-28 12:57 ` Alexey Perevalov
2017-04-28 15:55 ` Dr. David Alan Gilbert
2017-04-28 6:57 ` [Qemu-devel] [PATCH RESEND V3 4/6] migration: add postcopy downtime into MigrationIncommingState Alexey Perevalov
2017-04-28 9:38 ` Peter Xu
2017-04-28 10:03 ` Alexey Perevalov
2017-04-28 10:07 ` Peter Xu
2017-04-28 16:22 ` Dr. David Alan Gilbert
2017-04-29 9:16 ` Alexey
2017-04-29 15:02 ` Eric Blake
2017-05-02 8:51 ` Dr. David Alan Gilbert
2017-05-04 13:09 ` Alexey
2017-05-05 14:11 ` Dr. David Alan Gilbert
2017-05-05 16:25 ` Alexey
2017-04-28 6:57 ` [Qemu-devel] [PATCH RESEND V3 5/6] migration: calculate downtime on dst side Alexey Perevalov
2017-04-28 10:00 ` Peter Xu
2017-04-28 11:11 ` Alexey Perevalov
2017-05-08 6:29 ` Peter Xu
2017-05-08 9:08 ` Alexey
2017-05-09 8:26 ` Peter Xu
2017-05-09 9:40 ` Dr. David Alan Gilbert
2017-05-09 9:44 ` Daniel P. Berrange
2017-05-10 15:46 ` Alexey
2017-05-10 15:58 ` Daniel P. Berrange
2017-05-11 4:56 ` Peter Xu
2017-05-11 7:09 ` Alexey
2017-05-11 6:46 ` Alexey
2017-05-09 15:19 ` Alexey
2017-05-09 19:01 ` Dr. David Alan Gilbert
2017-05-11 6:32 ` Alexey
2017-05-11 8:25 ` Dr. David Alan Gilbert
2017-04-28 16:34 ` Dr. David Alan Gilbert
2017-04-28 6:57 ` [Qemu-devel] [PATCH RESEND V3 6/6] migration: trace postcopy total downtime Alexey Perevalov
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=20170428090405.GC24485@pxdev.xzpeter.org \
--to=peterx@redhat.com \
--cc=a.perevalov@samsung.com \
--cc=dgilbert@redhat.com \
--cc=f4bug@amsat.org \
--cc=i.maximets@samsung.com \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.