Re: [vfio-users] [QEMU+OVMF+VIFO] Memory Prealloc

2022-12-18 Thread Ivan Volosyuk
It seems that is an issue on 5.10.xxx kernels, but no longer the case for the 5.15. On Wed, Nov 23, 2022 at 10:39 AM Ivan Volosyuk wrote: > > I'm highly confident that I use preallocated hugetlb pages and I have > most of ram free on 64GB system. The problem appears only with: > CONFIG_PREEMPT=y

Re: [vfio-users] [QEMU+OVMF+VIFO] Memory Prealloc

2022-11-22 Thread Ivan Volosyuk
I'm highly confident that I use preallocated hugetlb pages and I have most of ram free on 64GB system. The problem appears only with: CONFIG_PREEMPT=y $ cat /proc/sys/vm/nr_hugepages 8192 $ cat /proc/meminfo .. HugePages_Total:8192 HugePages_Free:0 $ mount |grep huge hugetlbfs on

Re: [vfio-users] [QEMU+OVMF+VIFO] Memory Prealloc

2022-11-22 Thread Alex Williamson
On Tue, 22 Nov 2022 12:35:56 -1000 Bryan Angelo wrote: > Related follow up. > > When I add memory to a running VM via hotplug, QEMU preallocates this > memory too (as expected based on your explanation). When I subsequently > remove memory added to the VM via hotplug, QEMU does not always

Re: [vfio-users] [QEMU+OVMF+VIFO] Memory Prealloc

2022-11-22 Thread Bryan Angelo
Related follow up. When I add memory to a running VM via hotplug, QEMU preallocates this memory too (as expected based on your explanation). When I subsequently remove memory added to the VM via hotplug, QEMU does not always appear to free the underlying memory. For example: -m

Re: [vfio-users] [QEMU+OVMF+VIFO] Memory Prealloc

2022-11-22 Thread Alex Williamson
On Tue, 22 Nov 2022 17:57:37 +1100 Ivan Volosyuk wrote: > Is there something special about the pinning step? When I start a new > VM with 16G in dedicated hugepages my system becomes quite > unresponsive for several seconds, significant packet loss and random > hang device oopses if I use

Re: [vfio-users] [QEMU+OVMF+VIFO] Memory Prealloc

2022-11-21 Thread Ivan Volosyuk
Is there something special about the pinning step? When I start a new VM with 16G in dedicated hugepages my system becomes quite unresponsive for several seconds, significant packet loss and random hang device oopses if I use preemptive kernel? On Mon, Nov 21, 2022 at 12:54 PM Alex Williamson

Re: [vfio-users] [QEMU+OVMF+VIFO] Memory Prealloc

2022-11-20 Thread Bryan Angelo
Thanks for the clear explanation and detail. On Sun, Nov 20, 2022, 17:54 Alex Williamson wrote: > On Sun, 20 Nov 2022 16:36:58 -0800 > Bryan Angelo wrote: > > > When passing-through via vfio-pci using QEMU 7.1.0 and OVMF, it appears > > that qemu preallocates all guest system memory. > > > >

Re: [vfio-users] [QEMU+OVMF+VIFO] Memory Prealloc

2022-11-20 Thread Alex Williamson
On Sun, 20 Nov 2022 16:36:58 -0800 Bryan Angelo wrote: > When passing-through via vfio-pci using QEMU 7.1.0 and OVMF, it appears > that qemu preallocates all guest system memory. > > qemu-system-x86_64 \ > -no-user-config \ > -nodefaults \ > -nographic \ > -rtc base=utc \ >

[vfio-users] [QEMU+OVMF+VIFO] Memory Prealloc

2022-11-20 Thread Bryan Angelo
When passing-through via vfio-pci using QEMU 7.1.0 and OVMF, it appears that qemu preallocates all guest system memory. qemu-system-x86_64 \ -no-user-config \ -nodefaults \ -nographic \ -rtc base=utc \ -boot strict=on \ -machine pc,accel=kvm,dump-guest-core=off \ -cpu