[Virtio-fs] [Qemu] how to use viriofs in qemu without NUMA

Zhao, Shirley shirley.zhao at intel.com
Tue Jul 5 09:01:45 UTC 2022


Thanks for the information. 
Yes, I also found the memory backend options on s390x, and also copy the command to x86, but failed. 

The following is the command used to start qemu + virtiofs + ubuntu 20.04. 
One is worked well using NUMA, another one is failed without NUMA. 
Is there anything wrong? 

The worked one with NUMA options: 

qemu-system-x86_64 -M pc -cpu host --enable-kvm -smp 2 -m 4G -object memory-backend-file,id=mem,size=4G,mem-path=/dev/shm,share=on -numa node,memdev=mem -chardev socket,id=char0,path=/tmp/vfsd.sock -device vhost-user-fs-pci,queue-size=1024,chardev=char0,tag=myfs -chardev stdio,mux=on,id=mon -mon chardev=mon,mode=readline -device virtio-serial-pci -device virtconsole,chardev=mon -vga none -display none -drive if=virtio,file=ubuntu.img

The failed one without NUMA options: 

qemu-system-x86_64 -M pc -cpu host --enable-kvm -smp 2 -m 4G -object memory-backend-file,id=mem,size=4G,mem-path=/dev/shm,share=on -machine q35,memory-backend=mem -chardev socket,id=char0,path=/tmp/vfsd.sock -device vhost-user-fs-pci,queue-size=1024,chardev=char0,tag=myfs -chardev stdio,mux=on,id=mon -mon chardev=mon,mode=readline -device virtio-serial-pci -device virtconsole,chardev=mon -vga none -display none -drive if=virtio,file=ubuntu.img


Thanks. 
- Shirley 

-----Original Message-----
From: Dr. David Alan Gilbert <dgilbert at redhat.com> 
Sent: Tuesday, July 5, 2022 4:04 PM
To: Thomas Huth <thuth at redhat.com>
Cc: Zhao, Shirley <shirley.zhao at intel.com>; qemu-devel at nongnu.org; virtio-fs at redhat.com; Stefan Hajnoczi <stefanha at redhat.com>
Subject: Re: [Qemu] how to use viriofs in qemu without NUMA

* Thomas Huth (thuth at redhat.com) wrote:
> On 05/07/2022 03.02, Zhao, Shirley wrote:
> > Hi, all,
> > 
> > I want to use virtiofs to share folder between host and guest.
> > 
> >  From the guide, it must set the NUMA node.
> > https://virtio-fs.gitlab.io/howto-qemu.html
> > 
> > But my guest doesn’t support NUMA.
> > 
> > Is there any guide to use qemu + virtiofs without NUMA?
> > 
> > Or does qemu have any plan to support it?
> 
>  Hi!
> 
> At least on s390x, you can also specify the memory backend via the 
> -machine option instead of using the -numa option, e.g.:
> 
>  qemu-system-s390x -machine memory-backend=mem \
>   -object memory-backend-file,id=mem,...
> 
> Not sure whether that works on other architectures, too, though. 
> Stefan, David, do you know?

Right, that's the way I do it on x86.
We wrote virtiofs before the memory-backend option existed, which is why the old docs talk about using the NUMA stuff.

Dave

>  Thomas
> 
--
Dr. David Alan Gilbert / dgilbert at redhat.com / Manchester, UK



More information about the Virtio-fs mailing list