qemu-discuss
[Top][All Lists]
Advanced

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

Re: Cannot launch with 1GB hugepages (QEMU 5.0)


From: Adam Gradzki
Subject: Re: Cannot launch with 1GB hugepages (QEMU 5.0)
Date: Thu, 04 Jun 2020 18:27:29 -0400
User-agent: Cyrus-JMAP/3.3.0-dev0-519-g0f677ba-fm-20200601.001-g0f677ba6

Please disregard. I had a space characted trailing a backslash in my script.

-- 
Adam Gradzki

On Thu, Jun 4, 2020, at 15:43, Adam Gradzki wrote:
> Hello,
> 
> I have a question about how QEMU uses hugepages.
> 
> Hugepages are 2048 kB by default on Arch Linux (Linux 5.6.15-arch1-1 #1 
> SMP PREEMPT Wed, 27 May 2020 23:42:26 +0000 GNU/Linux)
> 
> I do not encounter any QEMU problems when using this default 
> configuration. I create roughly 8GB of hugepages with this command:
> sudo su -c "echo 4000 > /proc/sys/vm/nr_hugepages"
> 
> I am then able to pass "-mem-path /dev/hugepages" to qemu-system-x86_64 
> and my VM launches successfully.
> 
> However, when I set hugepages to 1 GB and create eight of them with 
> this command:
> sudo su -c "echo 8 > /proc/sys/vm/nr_hugepages"
> 
> QEMU stops immediately with an error: qemu-system-x86_64:  : drive with 
> bus=0, unit=0 (index=0) exists
> 
> As an experiment I tried mounting a hugetlbfs on /dev/hugepages:
> sudo mount -t hugetlbfs -o mode=01770,gid=1000 hugetlbfs /dev/hugepages
> 
> I confirmed that the mount worked with "mount | grep huge":
> cgroup on /sys/fs/cgroup/hugetlb type cgroup 
> (rw,nosuid,nodev,noexec,relatime,hugetlb)
> hugetlbfs on /dev/hugepages type hugetlbfs 
> (rw,relatime,gid=1000,mode=1770,pagesize=1024M)
> 
> /proc/cmdline:
> root=/dev/nvme0n1p2 rw initrd=\initramfs-linux.img i915.enable_gvt=1 
> intel_iommu=igfx_off kvm.ignore_msrs=1 kvm.report_ignored_msrs=0 
> default_hugepagesz=1G
> 
> The QEMU error is the same as before. What can I do to get 1 GB 
> hugepages working with QEMU 5.0?
> 
> -- 
> Adam Gradzki



reply via email to

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