Re: [PATCH][RESEND v3 1/3] hapvdimm: add a virtual DIMM device for memory hot-add protocols

2023-03-02 Thread David Hildenbrand
On 01.03.23 23:08, Maciej S. Szmigiero wrote: On 1.03.2023 18:24, David Hildenbrand wrote: (...) With virtio-mem one can simply have per-node virtio-mem devices. 2) I'm not sure what's the overhead of having, let's say, 1 TiB backing memory device mostly marked madvise(MADV_DONTNEED). Like, how

Re: [PATCH][RESEND v3 1/3] hapvdimm: add a virtual DIMM device for memory hot-add protocols

2023-03-01 Thread Maciej S. Szmigiero
On 1.03.2023 18:24, David Hildenbrand wrote: (...) With virtio-mem one can simply have per-node virtio-mem devices. 2) I'm not sure what's the overhead of having, let's say, 1 TiB backing memory device mostly marked madvise(MADV_DONTNEED). Like, how much memory + swap this setup would actually c

Re: [PATCH][RESEND v3 1/3] hapvdimm: add a virtual DIMM device for memory hot-add protocols

2023-03-01 Thread David Hildenbrand
The idea would seem reasonable, but: (there's always some "but") 1) Once we implement NUMA support we'd probably need multiple TYPE_MEMORY_DEVICEs anyway, since it seems one memdev can sit on only one NUMA node, Not necessarily. You could extend the hv-balloon device to have one memslot for e

Re: [PATCH][RESEND v3 1/3] hapvdimm: add a virtual DIMM device for memory hot-add protocols

2023-03-01 Thread Maciej S. Szmigiero
On 28.02.2023 23:12, David Hildenbrand wrote: On 28.02.23 22:27, Maciej S. Szmigiero wrote: On 28.02.2023 16:02, David Hildenbrand wrote: That was more or less the approach that v1 of this driver took: The QEMU manager inserted virtual DIMMs (Hyper-V DM memory devices, whatever one calls them)

Re: [PATCH][RESEND v3 1/3] hapvdimm: add a virtual DIMM device for memory hot-add protocols

2023-02-28 Thread David Hildenbrand
On 28.02.23 22:27, Maciej S. Szmigiero wrote: On 28.02.2023 16:02, David Hildenbrand wrote: That was more or less the approach that v1 of this driver took: The QEMU manager inserted virtual DIMMs (Hyper-V DM memory devices, whatever one calls them) explicitly via the machine hotplug handler (us

Re: [PATCH][RESEND v3 1/3] hapvdimm: add a virtual DIMM device for memory hot-add protocols

2023-02-28 Thread Maciej S. Szmigiero
On 28.02.2023 16:02, David Hildenbrand wrote: That was more or less the approach that v1 of this driver took: The QEMU manager inserted virtual DIMMs (Hyper-V DM memory devices, whatever one calls them) explicitly via the machine hotplug handler (using the device_add command). At that time you

Re: [PATCH][RESEND v3 1/3] hapvdimm: add a virtual DIMM device for memory hot-add protocols

2023-02-28 Thread David Hildenbrand
That was more or less the approach that v1 of this driver took: The QEMU manager inserted virtual DIMMs (Hyper-V DM memory devices, whatever one calls them) explicitly via the machine hotplug handler (using the device_add command). At that time you said [1] that: 1) I dislike that an external e

Re: [PATCH][RESEND v3 1/3] hapvdimm: add a virtual DIMM device for memory hot-add protocols

2023-02-28 Thread Maciej S. Szmigiero
On 27.02.2023 16:25, David Hildenbrand wrote: On 24.02.23 22:41, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" This device works like a virtual DIMM stick: it allows inserting extra RAM All DIMMs in QEMU are virtual. What you want it, a piece of memory that doesn not get exposed vi

Re: [PATCH][RESEND v3 1/3] hapvdimm: add a virtual DIMM device for memory hot-add protocols

2023-02-27 Thread David Hildenbrand
On 24.02.23 22:41, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" This device works like a virtual DIMM stick: it allows inserting extra RAM All DIMMs in QEMU are virtual. What you want it, a piece of memory that doesn not get exposed via ACPI or similar (and doesn't follow the trad

[PATCH][RESEND v3 1/3] hapvdimm: add a virtual DIMM device for memory hot-add protocols

2023-02-24 Thread Maciej S. Szmigiero
From: "Maciej S. Szmigiero" This device works like a virtual DIMM stick: it allows inserting extra RAM into the guest at run time and later removing it without having to duplicate all of the address space management logic of TYPE_MEMORY_DEVICE in each memory hot-add protocol driver. This device