[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/20] migration: Add pss.postcopy_requested status
From: |
Peter Xu |
Subject: |
[PATCH 08/20] migration: Add pss.postcopy_requested status |
Date: |
Wed, 16 Feb 2022 14:27:57 +0800 |
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.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
---
migration/ram.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/migration/ram.c b/migration/ram.c
index 25a3ab5150..1ed70b17d7 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -413,6 +413,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;
@@ -1486,6 +1488,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) {
@@ -1980,6 +1985,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
- [PATCH 03/20] migration: Tracepoint change in postcopy-run bottom half, (continued)
- [PATCH 03/20] migration: Tracepoint change in postcopy-run bottom half, Peter Xu, 2022/02/16
- [PATCH 04/20] migration: Introduce postcopy channels on dest node, Peter Xu, 2022/02/16
- [PATCH 02/20] migration: Finer grained tracepoints for POSTCOPY_LISTEN, Peter Xu, 2022/02/16
- [PATCH 05/20] migration: Dump ramblock and offset too when non-same-page detected, Peter Xu, 2022/02/16
- [PATCH 06/20] migration: Add postcopy_thread_create(), Peter Xu, 2022/02/16
- [PATCH 07/20] migration: Move static var in ram_block_from_stream() into global, Peter Xu, 2022/02/16
- [PATCH 08/20] migration: Add pss.postcopy_requested status,
Peter Xu <=
- [PATCH 09/20] migration: Move migrate_allow_multifd and helpers into migration.c, Peter Xu, 2022/02/16
- [PATCH 10/20] migration: Enlarge postcopy recovery to capture !-EIO too, Peter Xu, 2022/02/16
- [PATCH 11/20] migration: postcopy_pause_fault_thread() never fails, Peter Xu, 2022/02/16
- [PATCH 12/20] migration: Export ram_load_postcopy(), Peter Xu, 2022/02/16
- [PATCH 13/20] migration: Move channel setup out of postcopy_try_recover(), Peter Xu, 2022/02/16