[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH RFC 03/15] migration: Enable UFFD_FEATURE_THREAD_ID even with
|
From: |
Dr. David Alan Gilbert |
|
Subject: |
Re: [PATCH RFC 03/15] migration: Enable UFFD_FEATURE_THREAD_ID even without blocktime feat |
|
Date: |
Wed, 19 Jan 2022 14:15:52 +0000 |
|
User-agent: |
Mutt/2.1.5 (2021-12-30) |
* Peter Xu (peterx@redhat.com) wrote:
> 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>
> ---
> 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.32.0
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
- [PATCH RFC 00/15] migration: Postcopy Preemption, Peter Xu, 2022/01/19
- [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