qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1 00/15] libvhost-user: support more memslots and cleanup me


From: David Hildenbrand
Subject: Re: [PATCH v1 00/15] libvhost-user: support more memslots and cleanup memslot handling code
Date: Fri, 9 Feb 2024 23:36:55 +0100
User-agent: Mozilla Thunderbird

On 07.02.24 12:40, Stefano Garzarella wrote:
On Fri, Feb 02, 2024 at 10:53:17PM +0100, David Hildenbrand wrote:
This series adds support for more memslots (509) to libvhost-user, to
make it fully compatible with virtio-mem that uses up to 256 memslots
accross all memory devices in "dynamic-memslot" mode (more details
in patch #3).

One simple fix upfront.

With that in place, this series optimizes and extens memory region
handling in libvhost-user:
* Heavily deduplicate and clean up the memory region handling code
* Speeds up GPA->VA translation with many memslots using binary search
* Optimize mmap_offset handling to use it as fd_offset for mmap()
* Avoid ring remapping when adding a single memory region
* Avoid dumping all guest memory, possibly allocating memory in sparse
  memory mappings when the process crashes

I'm being very careful to not break some weird corner case that modern
QEMU might no longer trigger, but older one could have triggered or some
other frontend might trigger.

The only thing where I am not careful is to forbid memory regions that
overlap in GPA space: it doesn't make any sense.

With this series, virtio-mem (with dynamic-memslots=on) +
qemu-storage-daemon works flawlessly and as expected in my tests.

I don't know much about this code, but I didn't find anything wrong with
it. Thank you also for the great cleanup!

Acked-by: Stefano Garzarella <sgarzare@redhat.com>

Thanks Stefano for the review, highly appreciated!

--
Cheers,

David / dhildenb




reply via email to

[Prev in Thread] Current Thread [Next in Thread]