[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH RFC 11/15] migration: Add pss.postcopy_requested status
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [PATCH RFC 11/15] migration: Add pss.postcopy_requested status |
Date: |
Thu, 3 Feb 2022 15:42:27 +0000 |
User-agent: |
Mutt/2.1.5 (2021-12-30) |
* Peter Xu (peterx@redhat.com) wrote:
> This boolean flag shows whether the current page during migration is triggered
> by postcopy or not. Then in ram_save_host_page() and deeper stack we'll be
> able to have a reference on the priority of this page.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
> migration/ram.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/migration/ram.c b/migration/ram.c
> index 3a7d943f9c..b7d17613e8 100644
> --- a/migration/ram.c
> +++ b/migration/ram.c
> @@ -400,6 +400,8 @@ struct PageSearchStatus {
> unsigned long page;
> /* Set once we wrap around */
> bool complete_round;
> + /* Whether current page is explicitly requested by postcopy */
> + bool postcopy_requested;
> };
> typedef struct PageSearchStatus PageSearchStatus;
>
> @@ -1480,6 +1482,9 @@ retry:
> */
> static bool find_dirty_block(RAMState *rs, PageSearchStatus *pss, bool
> *again)
> {
> + /* This is not a postcopy requested page */
> + pss->postcopy_requested = false;
> +
> pss->page = migration_bitmap_find_dirty(rs, pss->block, pss->page);
> if (pss->complete_round && pss->block == rs->last_seen_block &&
> pss->page >= rs->last_page) {
> @@ -1971,6 +1976,7 @@ static bool get_queued_page(RAMState *rs,
> PageSearchStatus *pss)
> * really rare.
> */
> pss->complete_round = false;
> + pss->postcopy_requested = true;
> }
>
> return !!block;
> --
> 2.32.0
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH RFC 11/15] migration: Add pss.postcopy_requested status,
Dr. David Alan Gilbert <=