[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH RFC 11/15] migration: Add pss.postcopy_requested status
From: |
Peter Xu |
Subject: |
[PATCH RFC 11/15] migration: Add pss.postcopy_requested status |
Date: |
Wed, 19 Jan 2022 16:09:25 +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.
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 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
- [PATCH RFC 01/15] migration: No off-by-one for pss->page update in host page size, (continued)
- [PATCH RFC 01/15] migration: No off-by-one for pss->page update in host page size, Peter Xu, 2022/01/19
- [PATCH RFC 03/15] migration: Enable UFFD_FEATURE_THREAD_ID even without blocktime feat, Peter Xu, 2022/01/19
- [PATCH RFC 02/15] migration: Allow pss->page jump over clean pages, Peter Xu, 2022/01/19
- [PATCH RFC 04/15] migration: Add postcopy_has_request(), Peter Xu, 2022/01/19
- [PATCH RFC 05/15] migration: Simplify unqueue_page(), Peter Xu, 2022/01/19
- [PATCH RFC 06/15] migration: Move temp page setup and cleanup into separate functions, Peter Xu, 2022/01/19
- [PATCH RFC 07/15] migration: Introduce postcopy channels on dest node, Peter Xu, 2022/01/19
- [PATCH RFC 08/15] migration: Dump ramblock and offset too when non-same-page detected, Peter Xu, 2022/01/19
- [PATCH RFC 09/15] migration: Add postcopy_thread_create(), Peter Xu, 2022/01/19
- [PATCH RFC 10/15] migration: Move static var in ram_block_from_stream() into global, Peter Xu, 2022/01/19
- [PATCH RFC 11/15] migration: Add pss.postcopy_requested status,
Peter Xu <=
- [PATCH RFC 12/15] migration: Move migrate_allow_multifd and helpers into migration.c, Peter Xu, 2022/01/19
- [PATCH RFC 13/15] migration: Add postcopy-preempt capability, Peter Xu, 2022/01/19
- [PATCH RFC 15/15] tests: Add postcopy preempt test, Peter Xu, 2022/01/19
- [PATCH RFC 14/15] migration: Postcopy preemption on separate channel, Peter Xu, 2022/01/19
- Re: [PATCH RFC 00/15] migration: Postcopy Preemption, Dr. David Alan Gilbert, 2022/01/19