[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/3] migration/postcopy: rename postcopy_ram_enable_notify to
From: |
Dr. David Alan Gilbert |
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 |
User-agent: |
Mutt/1.12.1 (2019-06-15) |
* Wei Yang (address@hidden) 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 <address@hidden>
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 <address@hidden>
> ---
> 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 / address@hidden / Manchester, UK
- [PATCH 0/3] migration/postcopy: cleanup related to postcopy, Wei Yang, 2019/10/01
- [PATCH 1/3] migration/postcopy: rename postcopy_ram_enable_notify to postcopy_ram_incoming_setup, Wei Yang, 2019/10/01
- Re: [PATCH 1/3] migration/postcopy: rename postcopy_ram_enable_notify to postcopy_ram_incoming_setup,
Dr. David Alan Gilbert <=
- [PATCH 3/3] migration/postcopy: handle POSTCOPY_INCOMING_RUNNING corner case properly, Wei Yang, 2019/10/01
- Re: [PATCH 3/3] migration/postcopy: handle POSTCOPY_INCOMING_RUNNING corner case properly, Dr. David Alan Gilbert, 2019/10/08
- Re: [PATCH 3/3] migration/postcopy: handle POSTCOPY_INCOMING_RUNNING corner case properly, Wei Yang, 2019/10/08
- Re: [PATCH 3/3] migration/postcopy: handle POSTCOPY_INCOMING_RUNNING corner case properly, Peter Xu, 2019/10/09
- Re: [PATCH 3/3] migration/postcopy: handle POSTCOPY_INCOMING_RUNNING corner case properly, Wei Yang, 2019/10/09
- Re: [PATCH 3/3] migration/postcopy: handle POSTCOPY_INCOMING_RUNNING corner case properly, Peter Xu, 2019/10/09
- Re: [PATCH 3/3] migration/postcopy: handle POSTCOPY_INCOMING_RUNNING corner case properly, Wei Yang, 2019/10/09
- Re: [PATCH 3/3] migration/postcopy: handle POSTCOPY_INCOMING_RUNNING corner case properly, Dr. David Alan Gilbert, 2019/10/09
- Re: [PATCH 3/3] migration/postcopy: handle POSTCOPY_INCOMING_RUNNING corner case properly, Wei Yang, 2019/10/09