[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH RFC 13/15] vhost-user: Increase VHOST_USER_MAX_RAM_SLOTS to 496 w
From: |
David Hildenbrand |
Subject: |
[PATCH RFC 13/15] vhost-user: Increase VHOST_USER_MAX_RAM_SLOTS to 496 with CONFIG_VIRTIO_MEM |
Date: |
Wed, 13 Oct 2021 12:33:28 +0200 |
Let's increase the number of slots to 4096 to allow for increased
flexibility with virtio-mem when dealing with large virtio-mem devices
that start out small.
In the future, we might want to look into some performance improvements,
but for now there isn't really anything stopping us from raising the
limit.
Signed-off-by: David Hildenbrand <david@redhat.com>
---
hw/virtio/vhost-user.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index 2c8556237f..1c6a720728 100644
--- a/hw/virtio/vhost-user.c
+++ b/hw/virtio/vhost-user.c
@@ -24,6 +24,7 @@
#include "sysemu/cryptodev.h"
#include "migration/migration.h"
#include "migration/postcopy-ram.h"
+#include CONFIG_DEVICES
#include "trace.h"
#include <sys/ioctl.h>
@@ -45,8 +46,10 @@
* the maximum number supported by the target
* hardware plaform.
*/
-#if defined(TARGET_X86) || defined(TARGET_X86_64) || \
- defined(TARGET_ARM) || defined(TARGET_ARM_64)
+#if defined(CONFIG_VIRTIO_MEM)
+#define VHOST_USER_MAX_RAM_SLOTS 4096
+#elif defined(TARGET_X86) || defined(TARGET_X86_64) || \
+ defined(TARGET_ARM) || defined(TARGET_ARM_64)
#include "hw/acpi/acpi.h"
#define VHOST_USER_MAX_RAM_SLOTS ACPI_MAX_RAM_SLOTS
--
2.31.1
- [PATCH RFC 06/15] memory-device: Move memory_device_check_addable() directly into memory_device_pre_plug(), (continued)
- [PATCH RFC 06/15] memory-device: Move memory_device_check_addable() directly into memory_device_pre_plug(), David Hildenbrand, 2021/10/13
- [PATCH RFC 07/15] memory-device: Generalize memory_device_used_region_size(), David Hildenbrand, 2021/10/13
- [PATCH RFC 08/15] memory-device: Support memory devices that consume a variable number of memslots, David Hildenbrand, 2021/10/13
- [PATCH RFC 09/15] vhost: Respect reserved memslots for memory devices when realizing a vhost device, David Hildenbrand, 2021/10/13
- [PATCH RFC 10/15] virtio-mem: Set the RamDiscardManager for the RAM memory region earlier, David Hildenbrand, 2021/10/13
- [PATCH RFC 11/15] virtio-mem: Fix typo in virito_mem_intersect_memory_section() function name, David Hildenbrand, 2021/10/13
- [PATCH RFC 12/15] virtio-mem: Expose device memory via separate memslots, David Hildenbrand, 2021/10/13
- [PATCH RFC 13/15] vhost-user: Increase VHOST_USER_MAX_RAM_SLOTS to 496 with CONFIG_VIRTIO_MEM,
David Hildenbrand <=
- [PATCH RFC 14/15] libvhost-user: Increase VHOST_USER_MAX_RAM_SLOTS to 4096, David Hildenbrand, 2021/10/13
- [PATCH RFC 15/15] virtio-mem: Set "max-memslots" to 0 (auto) for the 6.2 machine, David Hildenbrand, 2021/10/13
- Re: [PATCH RFC 00/15] virtio-mem: Expose device memory via separate memslots, Dr. David Alan Gilbert, 2021/10/13