[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 33/36] migration: Enable UFFD_FEATURE_THREAD_ID even without block
From: |
Juan Quintela |
Subject: |
[PULL 33/36] migration: Enable UFFD_FEATURE_THREAD_ID even without blocktime feat |
Date: |
Fri, 28 Jan 2022 19:30:30 +0100 |
From: Peter Xu <peterx@redhat.com>
This patch allows us to read the tid even without blocktime feature enabled.
It's useful when tracing postcopy fault thread on faulted pages to show thread
id too with the address.
Remove the comments - they're merely not helpful at all.
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
migration/postcopy-ram.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c
index d18b5d05b2..2176ed68a5 100644
--- a/migration/postcopy-ram.c
+++ b/migration/postcopy-ram.c
@@ -283,15 +283,13 @@ static bool ufd_check_and_apply(int ufd,
MigrationIncomingState *mis)
}
#ifdef UFFD_FEATURE_THREAD_ID
- if (migrate_postcopy_blocktime() && mis &&
- UFFD_FEATURE_THREAD_ID & supported_features) {
- /* kernel supports that feature */
- /* don't create blocktime_context if it exists */
- if (!mis->blocktime_ctx) {
- mis->blocktime_ctx = blocktime_context_new();
- }
-
+ if (UFFD_FEATURE_THREAD_ID & supported_features) {
asked_features |= UFFD_FEATURE_THREAD_ID;
+ if (migrate_postcopy_blocktime()) {
+ if (!mis->blocktime_ctx) {
+ mis->blocktime_ctx = blocktime_context_new();
+ }
+ }
}
#endif
--
2.34.1
- [PULL 25/36] migration: Don't return for postcopy_chunk_hostpages(), (continued)
- [PULL 25/36] migration: Don't return for postcopy_chunk_hostpages(), Juan Quintela, 2022/01/28
- [PULL 24/36] migration: Drop dead code of ram_debug_dump_bitmap(), Juan Quintela, 2022/01/28
- [PULL 27/36] migration: Do chunk page in postcopy_each_ram_send_discard(), Juan Quintela, 2022/01/28
- [PULL 26/36] migration: Drop postcopy_chunk_hostpages(), Juan Quintela, 2022/01/28
- [PULL 28/36] migration: Drop return code for disgard ram process, Juan Quintela, 2022/01/28
- [PULL 30/36] migration: Introduce ram_transferred_add(), Juan Quintela, 2022/01/28
- [PULL 29/36] migration: Don't return for postcopy_send_discard_bm_ram(), Juan Quintela, 2022/01/28
- [PULL 31/36] migration: Tally pre-copy, downtime and post-copy bytes independently, Juan Quintela, 2022/01/28
- [PULL 34/36] migration: Add postcopy_has_request(), Juan Quintela, 2022/01/28
- [PULL 32/36] migration: No off-by-one for pss->page update in host page size, Juan Quintela, 2022/01/28
- [PULL 33/36] migration: Enable UFFD_FEATURE_THREAD_ID even without blocktime feat,
Juan Quintela <=
- [PULL 36/36] migration: Move temp page setup and cleanup into separate functions, Juan Quintela, 2022/01/28
- [PULL 35/36] migration: Simplify unqueue_page(), Juan Quintela, 2022/01/28
- Re: [PULL 00/36] Migration 20220128 patches, Peter Maydell, 2022/01/30