[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 0/8] virtio-mem: Handle preallocation with migration
From: |
Peter Xu |
Subject: |
Re: [PATCH v5 0/8] virtio-mem: Handle preallocation with migration |
Date: |
Tue, 17 Jan 2023 10:40:02 -0500 |
On Tue, Jan 17, 2023 at 12:22:41PM +0100, David Hildenbrand wrote:
> While playing with migration of virtio-mem with an ordinary file backing,
> I realized that migration and prealloc doesn't currently work as expected
> for virtio-mem. Further, Jing Qi reported that setup issues (insufficient
> huge pages on the destination) result in QEMU getting killed with SIGBUS
> instead of failing gracefully.
>
> In contrast to ordinary memory backend preallocation, virtio-mem
> preallocates memory before plugging blocks to the guest. Consequently,
> when migrating we are not actually preallocating on the destination but
> "only" migrate pages. Fix that be migrating the bitmap early, before any
> RAM content, and use that information to preallocate memory early, before
> migrating any RAM.
>
> Postcopy needs some extra care, and I realized that prealloc+postcopy is
> shaky in general. Let's at least try to mimic what ordinary
> prealloc+postcopy does: temporarily allocate the memory, discard it, and
> cross fingers that we'll still have sufficient memory when postcopy
> actually tries placing pages.
>
> Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
> Cc: Juan Quintela <quintela@redhat.com>
> Cc: Peter Xu <peterx@redhat.com>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Cc: Michal Privoznik <mprivozn@redhat.com>
For patch 1-5:
Reviewed-by: Peter Xu <peterx@redhat.com>
--
Peter Xu
- [PATCH v5 0/8] virtio-mem: Handle preallocation with migration, David Hildenbrand, 2023/01/17
- [PATCH v5 1/8] migration/savevm: Move more savevm handling into vmstate_save(), David Hildenbrand, 2023/01/17
- [PATCH v5 2/8] migration/savevm: Prepare vmdesc json writer in qemu_savevm_state_setup(), David Hildenbrand, 2023/01/17
- [PATCH v5 3/8] migration/savevm: Allow immutable device state to be migrated early (i.e., before RAM), David Hildenbrand, 2023/01/17
- [PATCH v5 4/8] migration/vmstate: Introduce VMSTATE_WITH_TMP_TEST() and VMSTATE_BITMAP_TEST(), David Hildenbrand, 2023/01/17
- [PATCH v5 6/8] virtio-mem: Fail if a memory backend with "prealloc=on" is specified, David Hildenbrand, 2023/01/17
- [PATCH v5 5/8] migration/ram: Factor out check for advised postcopy, David Hildenbrand, 2023/01/17
- [PATCH v5 7/8] virtio-mem: Migrate immutable properties early, David Hildenbrand, 2023/01/17
- [PATCH v5 8/8] virtio-mem: Proper support for preallocation with migration, David Hildenbrand, 2023/01/17
- Re: [PATCH v5 0/8] virtio-mem: Handle preallocation with migration,
Peter Xu <=
- Re: [PATCH v5 0/8] virtio-mem: Handle preallocation with migration, David Hildenbrand, 2023/01/23