Revision | 2d1c37c603ab3ed9ec1abfc4f4491b8680b23a77 (tree) |
---|---|
Time | 2022-01-28 23:38:23 |
Author | Peter Xu <peterx@redh...> |
Commiter | Juan Quintela |
migration: Enable UFFD_FEATURE_THREAD_ID even without blocktime feat
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>
@@ -283,15 +283,13 @@ static bool ufd_check_and_apply(int ufd, MigrationIncomingState *mis) | ||
283 | 283 | } |
284 | 284 | |
285 | 285 | #ifdef UFFD_FEATURE_THREAD_ID |
286 | - if (migrate_postcopy_blocktime() && mis && | |
287 | - UFFD_FEATURE_THREAD_ID & supported_features) { | |
288 | - /* kernel supports that feature */ | |
289 | - /* don't create blocktime_context if it exists */ | |
290 | - if (!mis->blocktime_ctx) { | |
291 | - mis->blocktime_ctx = blocktime_context_new(); | |
292 | - } | |
293 | - | |
286 | + if (UFFD_FEATURE_THREAD_ID & supported_features) { | |
294 | 287 | asked_features |= UFFD_FEATURE_THREAD_ID; |
288 | + if (migrate_postcopy_blocktime()) { | |
289 | + if (!mis->blocktime_ctx) { | |
290 | + mis->blocktime_ctx = blocktime_context_new(); | |
291 | + } | |
292 | + } | |
295 | 293 | } |
296 | 294 | #endif |
297 | 295 |