[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 1/4] migration: introduce 'background-snapshot' migration
From: |
Peter Xu |
Subject: |
Re: [PATCH v5 1/4] migration: introduce 'background-snapshot' migration capability |
Date: |
Tue, 8 Dec 2020 10:47:35 -0500 |
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,
> +
> + /* 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 */
--
Peter Xu
- [PATCH v5 0/4] migration: UFFD write-tracking migration/snapshots, Andrey Gruzdev, 2020/12/04
- [PATCH v5 3/4] migration: support UFFD write fault processing in ram_save_iterate(), Andrey Gruzdev, 2020/12/04
- [PATCH v5 4/4] migration: implementation of background snapshot thread, Andrey Gruzdev, 2020/12/04
- [PATCH v5 2/4] migration: introduce UFFD-WP low-level interface helpers, Andrey Gruzdev, 2020/12/04
- [PATCH v5 1/4] migration: introduce 'background-snapshot' migration capability, Andrey Gruzdev, 2020/12/04
- Re: [PATCH v5 1/4] migration: introduce 'background-snapshot' migration capability,
Peter Xu <=
- Re: [PATCH v5 0/4] migration: UFFD write-tracking migration/snapshots, Peter Xu, 2020/12/08