• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision2d1c37c603ab3ed9ec1abfc4f4491b8680b23a77 (tree)
Time2022-01-28 23:38:23
AuthorPeter Xu <peterx@redh...>
CommiterJuan Quintela

Log Message

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>

Change Summary

Incremental Difference

--- a/migration/postcopy-ram.c
+++ b/migration/postcopy-ram.c
@@ -283,15 +283,13 @@ static bool ufd_check_and_apply(int ufd, MigrationIncomingState *mis)
283283 }
284284
285285 #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) {
294287 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+ }
295293 }
296294 #endif
297295