From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Wei Yang <richardw.yang@linux.intel.com>
Cc: qemu-devel@nongnu.org, quintela@redhat.com
Subject: Re: [PATCH 1/3] migration/postcopy: rename postcopy_ram_enable_notify to postcopy_ram_incoming_setup
Date: Tue, 8 Oct 2019 15:17:40 +0100 [thread overview]
Message-ID: <20191008141740.GD3441@work-vm> (raw)
In-Reply-To: <20191001100122.17730-2-richardw.yang@linux.intel.com>
* Wei Yang (richardw.yang@linux.intel.com) wrote:
> Function postcopy_ram_incoming_setup and postcopy_ram_incoming_cleanup
> is a pair. Rename to make it clear for audience.
>
> Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Yes OK.
It really initially just setup the userfault, but it also kicks off the
fault thread as well so it has got a bit more hairy.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
> migration/postcopy-ram.c | 4 ++--
> migration/postcopy-ram.h | 2 +-
> migration/savevm.c | 2 +-
> 3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c
> index 1f63e65ed7..b24c4a10c2 100644
> --- a/migration/postcopy-ram.c
> +++ b/migration/postcopy-ram.c
> @@ -1094,7 +1094,7 @@ retry:
> return NULL;
> }
>
> -int postcopy_ram_enable_notify(MigrationIncomingState *mis)
> +int postcopy_ram_incoming_setup(MigrationIncomingState *mis)
> {
> /* Open the fd for the kernel to give us userfaults */
> mis->userfault_fd = syscall(__NR_userfaultfd, O_CLOEXEC | O_NONBLOCK);
> @@ -1321,7 +1321,7 @@ int postcopy_request_shared_page(struct PostCopyFD *pcfd, RAMBlock *rb,
> return -1;
> }
>
> -int postcopy_ram_enable_notify(MigrationIncomingState *mis)
> +int postcopy_ram_incoming_setup(MigrationIncomingState *mis)
> {
> assert(0);
> return -1;
> diff --git a/migration/postcopy-ram.h b/migration/postcopy-ram.h
> index 9c8bd2bae0..d2668cc820 100644
> --- a/migration/postcopy-ram.h
> +++ b/migration/postcopy-ram.h
> @@ -20,7 +20,7 @@ bool postcopy_ram_supported_by_host(MigrationIncomingState *mis);
> * Make all of RAM sensitive to accesses to areas that haven't yet been written
> * and wire up anything necessary to deal with it.
> */
> -int postcopy_ram_enable_notify(MigrationIncomingState *mis);
> +int postcopy_ram_incoming_setup(MigrationIncomingState *mis);
>
> /*
> * Initialise postcopy-ram, setting the RAM to a state where we can go into
> diff --git a/migration/savevm.c b/migration/savevm.c
> index adad938f57..f3292eb003 100644
> --- a/migration/savevm.c
> +++ b/migration/savevm.c
> @@ -1865,7 +1865,7 @@ static int loadvm_postcopy_handle_listen(MigrationIncomingState *mis)
> * shouldn't be doing anything yet so don't actually expect requests
> */
> if (migrate_postcopy_ram()) {
> - if (postcopy_ram_enable_notify(mis)) {
> + if (postcopy_ram_incoming_setup(mis)) {
> postcopy_ram_incoming_cleanup(mis);
> return -1;
> }
> --
> 2.17.1
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2019-10-08 14:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-01 10:01 [PATCH 0/3] migration/postcopy: cleanup related to postcopy Wei Yang
2019-10-01 10:01 ` [PATCH 1/3] migration/postcopy: rename postcopy_ram_enable_notify to postcopy_ram_incoming_setup Wei Yang
2019-10-08 14:17 ` Dr. David Alan Gilbert [this message]
2019-10-01 10:01 ` [PATCH 2/3] migration/postcopy: not necessary to do postcopy_ram_incoming_cleanup when state is ADVISE Wei Yang
2019-10-08 16:02 ` Dr. David Alan Gilbert
2019-10-09 0:55 ` Wei Yang
2019-10-09 9:03 ` Dr. David Alan Gilbert
2019-10-01 10:01 ` [PATCH 3/3] migration/postcopy: handle POSTCOPY_INCOMING_RUNNING corner case properly Wei Yang
2019-10-08 16:40 ` Dr. David Alan Gilbert
2019-10-09 1:02 ` Wei Yang
2019-10-09 4:12 ` Peter Xu
2019-10-09 5:07 ` Wei Yang
2019-10-09 5:36 ` Peter Xu
2019-10-09 6:07 ` Wei Yang
2019-10-09 9:08 ` Dr. David Alan Gilbert
2019-10-10 0:54 ` Wei Yang
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=20191008141740.GD3441@work-vm \
--to=dgilbert@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=richardw.yang@linux.intel.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).