All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Gruzdev <andrey.gruzdev@virtuozzo.com>
To: Peter Xu <peterx@redhat.com>
Cc: qemu-devel@nongnu.org, Den Lunev <den@openvz.org>,
	Eric Blake <eblake@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Juan Quintela <quintela@redhat.com>,
	"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
	Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH v5 1/4] migration: introduce 'background-snapshot' migration capability
Date: Wed, 9 Dec 2020 10:08:03 +0300	[thread overview]
Message-ID: <70b3aacf-61b8-ad82-8e5d-8b104135727d@virtuozzo.com> (raw)
In-Reply-To: <20201208154735.GA21402@xz-x1>

[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]

On 08.12.2020 18:47, Peter Xu wrote:
> On Fri, Dec 04, 2020 at 12:31:00PM +0300, Andrey Gruzdev wrote:
>> +static
>> +WriteTrackingSupport migrate_query_write_tracking(void)
>> +{
>> +    static WriteTrackingSupport wt_support = WT_SUPPORT_UNKNOWN;
> Better to be non-static - consider uncompatible memory can be hot plugged after
> it's once set.
>
> With static removed (I think most of below if clauses can be unwrapped too, but
> your call), feel free to add:
>
> Reviewed-by: Peter Xu <peterx@redhat.com>
>
> Thanks,

Yes, quite possible case with memory hot plug that you mentioned..
Thanks, I'll change it to non-static.

>> +
>> +    /* Check UFFD-IO and memory backends for compatibility only once */
>> +    if (wt_support == WT_SUPPORT_UNKNOWN) {
>> +        wt_support = WT_SUPPORT_ABSENT;
>> +        /* Check if kernel supports required UFFD features */
>> +        if (ram_write_tracking_available()) {
>> +            wt_support = WT_SUPPORT_AVAILABLE;
>> +            /*
>> +             * Check if current memory configuration is
>> +             * compatible with required UFFD features.
>> +             */
>> +            if (ram_write_tracking_compatible()) {
>> +                wt_support = WT_SUPPORT_COMPATIBLE;
>> +            }
>> +        }
>> +    }
>> +
>> +    return wt_support;
>> +}
>> +#endif /* CONFIG_LINUX */



[-- Attachment #2: Type: text/html, Size: 2106 bytes --]

  reply	other threads:[~2020-12-09  7:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04  9:30 [PATCH v5 0/4] migration: UFFD write-tracking migration/snapshots Andrey Gruzdev via
2020-12-04  9:31 ` [PATCH v5 1/4] migration: introduce 'background-snapshot' migration capability Andrey Gruzdev via
2020-12-08 15:47   ` Peter Xu
2020-12-09  7:08     ` Andrey Gruzdev [this message]
2020-12-04  9:31 ` [PATCH v5 2/4] migration: introduce UFFD-WP low-level interface helpers Andrey Gruzdev via
2020-12-08 17:57   ` Peter Xu
2020-12-04  9:31 ` [PATCH v5 3/4] migration: support UFFD write fault processing in ram_save_iterate() Andrey Gruzdev via
2020-12-08 18:09   ` Peter Xu
2020-12-04  9:31 ` [PATCH v5 4/4] migration: implementation of background snapshot thread Andrey Gruzdev via
2020-12-08 18:16   ` Peter Xu
2020-12-08 18:24 ` [PATCH v5 0/4] migration: UFFD write-tracking migration/snapshots Peter Xu
2020-12-09  7:17   ` Andrey Gruzdev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=70b3aacf-61b8-ad82-8e5d-8b104135727d@virtuozzo.com \
    --to=andrey.gruzdev@virtuozzo.com \
    --cc=armbru@redhat.com \
    --cc=den@openvz.org \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.