* [Qemu] how to use viriofs in qemu without NUMA @ 2022-07-05 1:02 Zhao, Shirley 2022-07-05 7:48 ` [Virtio-fs] " Thomas Huth 0 siblings, 1 reply; 16+ messages in thread From: Zhao, Shirley @ 2022-07-05 1:02 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 332 bytes --] 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? Thanks. * Shirley [-- Attachment #2: Type: text/html, Size: 4908 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu] how to use viriofs in qemu without NUMA 2022-07-05 1:02 [Qemu] how to use viriofs in qemu without NUMA Zhao, Shirley @ 2022-07-05 7:48 ` Thomas Huth 0 siblings, 0 replies; 16+ messages in thread From: Thomas Huth @ 2022-07-05 7:48 UTC (permalink / raw) To: Zhao, Shirley, qemu-devel Cc: virtio-fs, Stefan Hajnoczi, Dr. David Alan Gilbert 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? Thomas ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Virtio-fs] [Qemu] how to use viriofs in qemu without NUMA @ 2022-07-05 7:48 ` Thomas Huth 0 siblings, 0 replies; 16+ messages in thread From: Thomas Huth @ 2022-07-05 7:48 UTC (permalink / raw) To: Zhao, Shirley, qemu-devel Cc: virtio-fs, Stefan Hajnoczi, Dr. David Alan Gilbert 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? Thomas ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu] how to use viriofs in qemu without NUMA 2022-07-05 7:48 ` [Virtio-fs] " Thomas Huth @ 2022-07-05 8:03 ` Dr. David Alan Gilbert -1 siblings, 0 replies; 16+ messages in thread From: Dr. David Alan Gilbert @ 2022-07-05 8:03 UTC (permalink / raw) To: Thomas Huth; +Cc: Zhao, Shirley, qemu-devel, virtio-fs, Stefan Hajnoczi * Thomas Huth (thuth@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@redhat.com / Manchester, UK ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Virtio-fs] [Qemu] how to use viriofs in qemu without NUMA @ 2022-07-05 8:03 ` Dr. David Alan Gilbert 0 siblings, 0 replies; 16+ messages in thread From: Dr. David Alan Gilbert @ 2022-07-05 8:03 UTC (permalink / raw) To: Thomas Huth; +Cc: Zhao, Shirley, qemu-devel, virtio-fs, Stefan Hajnoczi * Thomas Huth (thuth@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@redhat.com / Manchester, UK ^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: [Qemu] how to use viriofs in qemu without NUMA 2022-07-05 8:03 ` [Virtio-fs] " Dr. David Alan Gilbert @ 2022-07-05 9:01 ` Zhao, Shirley -1 siblings, 0 replies; 16+ messages in thread From: Zhao, Shirley @ 2022-07-05 9:01 UTC (permalink / raw) To: Dr. David Alan Gilbert, Thomas Huth Cc: qemu-devel, virtio-fs, Stefan Hajnoczi 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@redhat.com> Sent: Tuesday, July 5, 2022 4:04 PM To: Thomas Huth <thuth@redhat.com> Cc: Zhao, Shirley <shirley.zhao@intel.com>; qemu-devel@nongnu.org; virtio-fs@redhat.com; Stefan Hajnoczi <stefanha@redhat.com> Subject: Re: [Qemu] how to use viriofs in qemu without NUMA * Thomas Huth (thuth@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@redhat.com / Manchester, UK ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Virtio-fs] [Qemu] how to use viriofs in qemu without NUMA @ 2022-07-05 9:01 ` Zhao, Shirley 0 siblings, 0 replies; 16+ messages in thread From: Zhao, Shirley @ 2022-07-05 9:01 UTC (permalink / raw) To: Dr. David Alan Gilbert, Thomas Huth Cc: qemu-devel, virtio-fs, Stefan Hajnoczi 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@redhat.com> Sent: Tuesday, July 5, 2022 4:04 PM To: Thomas Huth <thuth@redhat.com> Cc: Zhao, Shirley <shirley.zhao@intel.com>; qemu-devel@nongnu.org; virtio-fs@redhat.com; Stefan Hajnoczi <stefanha@redhat.com> Subject: Re: [Qemu] how to use viriofs in qemu without NUMA * Thomas Huth (thuth@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@redhat.com / Manchester, UK ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu] how to use viriofs in qemu without NUMA 2022-07-05 9:01 ` [Virtio-fs] " Zhao, Shirley @ 2022-07-05 9:36 ` Dr. David Alan Gilbert -1 siblings, 0 replies; 16+ messages in thread From: Dr. David Alan Gilbert @ 2022-07-05 9:36 UTC (permalink / raw) To: Zhao, Shirley; +Cc: Thomas Huth, qemu-devel, virtio-fs, Stefan Hajnoczi * Zhao, Shirley (shirley.zhao@intel.com) wrote: > 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 What error did it give? 20.04 is quite old, what qemu version is it? I'd have to check when the memdev= went in. Dave > > Thanks. > - Shirley > > -----Original Message----- > From: Dr. David Alan Gilbert <dgilbert@redhat.com> > Sent: Tuesday, July 5, 2022 4:04 PM > To: Thomas Huth <thuth@redhat.com> > Cc: Zhao, Shirley <shirley.zhao@intel.com>; qemu-devel@nongnu.org; virtio-fs@redhat.com; Stefan Hajnoczi <stefanha@redhat.com> > Subject: Re: [Qemu] how to use viriofs in qemu without NUMA > > * Thomas Huth (thuth@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@redhat.com / Manchester, UK > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Virtio-fs] [Qemu] how to use viriofs in qemu without NUMA @ 2022-07-05 9:36 ` Dr. David Alan Gilbert 0 siblings, 0 replies; 16+ messages in thread From: Dr. David Alan Gilbert @ 2022-07-05 9:36 UTC (permalink / raw) To: Zhao, Shirley; +Cc: Thomas Huth, qemu-devel, virtio-fs, Stefan Hajnoczi * Zhao, Shirley (shirley.zhao@intel.com) wrote: > 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 What error did it give? 20.04 is quite old, what qemu version is it? I'd have to check when the memdev= went in. Dave > > Thanks. > - Shirley > > -----Original Message----- > From: Dr. David Alan Gilbert <dgilbert@redhat.com> > Sent: Tuesday, July 5, 2022 4:04 PM > To: Thomas Huth <thuth@redhat.com> > Cc: Zhao, Shirley <shirley.zhao@intel.com>; qemu-devel@nongnu.org; virtio-fs@redhat.com; Stefan Hajnoczi <stefanha@redhat.com> > Subject: Re: [Qemu] how to use viriofs in qemu without NUMA > > * Thomas Huth (thuth@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@redhat.com / Manchester, UK > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK ^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: [Qemu] how to use viriofs in qemu without NUMA 2022-07-05 9:36 ` [Virtio-fs] " Dr. David Alan Gilbert @ 2022-07-08 0:40 ` Zhao, Shirley -1 siblings, 0 replies; 16+ messages in thread From: Zhao, Shirley @ 2022-07-08 0:40 UTC (permalink / raw) To: Dr. David Alan Gilbert Cc: Thomas Huth, qemu-devel, virtio-fs, Stefan Hajnoczi Yes, the qemu version is too old. My previous qemu version is 4.2, and I upgraded it into 6.0, and it worked now. Thanks a lot. - Shirley -----Original Message----- From: Dr. David Alan Gilbert <dgilbert@redhat.com> Sent: Tuesday, July 5, 2022 5:37 PM To: Zhao, Shirley <shirley.zhao@intel.com> Cc: Thomas Huth <thuth@redhat.com>; qemu-devel@nongnu.org; virtio-fs@redhat.com; Stefan Hajnoczi <stefanha@redhat.com> Subject: Re: [Qemu] how to use viriofs in qemu without NUMA * Zhao, Shirley (shirley.zhao@intel.com) wrote: > 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 What error did it give? 20.04 is quite old, what qemu version is it? I'd have to check when the memdev= went in. Dave > > Thanks. > - Shirley > > -----Original Message----- > From: Dr. David Alan Gilbert <dgilbert@redhat.com> > Sent: Tuesday, July 5, 2022 4:04 PM > To: Thomas Huth <thuth@redhat.com> > Cc: Zhao, Shirley <shirley.zhao@intel.com>; qemu-devel@nongnu.org; > virtio-fs@redhat.com; Stefan Hajnoczi <stefanha@redhat.com> > Subject: Re: [Qemu] how to use viriofs in qemu without NUMA > > * Thomas Huth (thuth@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@redhat.com / Manchester, UK > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Virtio-fs] [Qemu] how to use viriofs in qemu without NUMA @ 2022-07-08 0:40 ` Zhao, Shirley 0 siblings, 0 replies; 16+ messages in thread From: Zhao, Shirley @ 2022-07-08 0:40 UTC (permalink / raw) To: Dr. David Alan Gilbert Cc: Thomas Huth, qemu-devel, virtio-fs, Stefan Hajnoczi Yes, the qemu version is too old. My previous qemu version is 4.2, and I upgraded it into 6.0, and it worked now. Thanks a lot. - Shirley -----Original Message----- From: Dr. David Alan Gilbert <dgilbert@redhat.com> Sent: Tuesday, July 5, 2022 5:37 PM To: Zhao, Shirley <shirley.zhao@intel.com> Cc: Thomas Huth <thuth@redhat.com>; qemu-devel@nongnu.org; virtio-fs@redhat.com; Stefan Hajnoczi <stefanha@redhat.com> Subject: Re: [Qemu] how to use viriofs in qemu without NUMA * Zhao, Shirley (shirley.zhao@intel.com) wrote: > 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 What error did it give? 20.04 is quite old, what qemu version is it? I'd have to check when the memdev= went in. Dave > > Thanks. > - Shirley > > -----Original Message----- > From: Dr. David Alan Gilbert <dgilbert@redhat.com> > Sent: Tuesday, July 5, 2022 4:04 PM > To: Thomas Huth <thuth@redhat.com> > Cc: Zhao, Shirley <shirley.zhao@intel.com>; qemu-devel@nongnu.org; > virtio-fs@redhat.com; Stefan Hajnoczi <stefanha@redhat.com> > Subject: Re: [Qemu] how to use viriofs in qemu without NUMA > > * Thomas Huth (thuth@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@redhat.com / Manchester, UK > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK ^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: [Qemu] how to use viriofs in qemu without NUMA 2022-07-08 0:40 ` [Virtio-fs] " Zhao, Shirley @ 2022-07-12 7:06 ` Zhao, Shirley -1 siblings, 0 replies; 16+ messages in thread From: Zhao, Shirley @ 2022-07-12 7:06 UTC (permalink / raw) To: Dr. David Alan Gilbert Cc: Thomas Huth, qemu-devel, virtio-fs, Stefan Hajnoczi Hi, all, I have another question want to consult you. To enable DAX in virtiofs, according to the memu https://virtio-fs.gitlab.io/howto-qemu.html. I need to add "cache-size=2G" as below. -device vhost-user-fs-pci,queue-size=1024,chardev=char0,tag=myfs,cache-size=2G My qemu command is: sudo qemu-system-x86_64 -M pc -cpu host --enable-kvm -smp 2 -m 4G -drive if=virtio,file=ubuntu.img -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/vhostqemu -device vhost-user-fs-pci,queue-size=1024,chardev=char0,tag=myfs_root,cache-size=2G -chardev stdio,mux=on,id=mon -mon chardev=mon,mode=readline -device virtio-serial-pci -device virtconsole,chardev=mon -vga none -display none And virtiofsd command is: sudo ./virtiofsd --socket-path=/tmp/vhostqemu -o source=/home/shirley/testdir -o cache=always But there is no option of "cache-size" in qemu 6.0, like below. So how to enable it? qemu-6.0.0$ qemu-system-x86_64 -device vhost-user-fs-pci,help vhost-user-fs-pci options: acpi-index=<uint32> - (default: 0) addr=<int32> - Slot and optional function number, example: 06.0 or 06 (default: -1) aer=<bool> - on/off (default: false) any_layout=<bool> - on/off (default: true) ats=<bool> - on/off (default: false) bootindex=<int32> chardev=<str> - ID of a chardev to use as a backend event_idx=<bool> - on/off (default: true) failover_pair_id=<str> indirect_desc=<bool> - on/off (default: true) iommu_platform=<bool> - on/off (default: false) migrate-extra=<bool> - on/off (default: true) modern-pio-notify=<bool> - on/off (default: false) multifunction=<bool> - on/off (default: false) notify_on_empty=<bool> - on/off (default: true) num-request-queues=<uint16> - (default: 1) packed=<bool> - on/off (default: false) page-per-vq=<bool> - on/off (default: false) queue-size=<uint16> - (default: 128) rombar=<uint32> - (default: 1) romfile=<str> romsize=<uint32> - (default: 4294967295) tag=<str> use-disabled-flag=<bool> - (default: true) use-started=<bool> - (default: true) vectors=<uint32> - (default: 4294967295) virtio-backend=<child<vhost-user-fs-device>> virtio-pci-bus-master-bug-migration=<bool> - on/off (default: false) x-ats-page-aligned=<bool> - on/off (default: true) x-disable-legacy-check=<bool> - (default: false) x-disable-pcie=<bool> - on/off (default: false) x-ignore-backend-features=<bool> - (default: false) x-pcie-deverr-init=<bool> - on/off (default: true) x-pcie-extcap-init=<bool> - on/off (default: true) x-pcie-flr-init=<bool> - on/off (default: true) x-pcie-lnkctl-init=<bool> - on/off (default: true) x-pcie-lnksta-dllla=<bool> - on/off (default: true) x-pcie-pm-init=<bool> - on/off (default: true) -----Original Message----- From: Zhao, Shirley Sent: Friday, July 8, 2022 8:40 AM To: Dr. David Alan Gilbert <dgilbert@redhat.com> Cc: Thomas Huth <thuth@redhat.com>; qemu-devel@nongnu.org; virtio-fs@redhat.com; Stefan Hajnoczi <stefanha@redhat.com> Subject: RE: [Qemu] how to use viriofs in qemu without NUMA Yes, the qemu version is too old. My previous qemu version is 4.2, and I upgraded it into 6.0, and it worked now. Thanks a lot. - Shirley -----Original Message----- From: Dr. David Alan Gilbert <dgilbert@redhat.com> Sent: Tuesday, July 5, 2022 5:37 PM To: Zhao, Shirley <shirley.zhao@intel.com> Cc: Thomas Huth <thuth@redhat.com>; qemu-devel@nongnu.org; virtio-fs@redhat.com; Stefan Hajnoczi <stefanha@redhat.com> Subject: Re: [Qemu] how to use viriofs in qemu without NUMA * Zhao, Shirley (shirley.zhao@intel.com) wrote: > 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 What error did it give? 20.04 is quite old, what qemu version is it? I'd have to check when the memdev= went in. Dave > > Thanks. > - Shirley > > -----Original Message----- > From: Dr. David Alan Gilbert <dgilbert@redhat.com> > Sent: Tuesday, July 5, 2022 4:04 PM > To: Thomas Huth <thuth@redhat.com> > Cc: Zhao, Shirley <shirley.zhao@intel.com>; qemu-devel@nongnu.org; > virtio-fs@redhat.com; Stefan Hajnoczi <stefanha@redhat.com> > Subject: Re: [Qemu] how to use viriofs in qemu without NUMA > > * Thomas Huth (thuth@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@redhat.com / Manchester, UK > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Virtio-fs] [Qemu] how to use viriofs in qemu without NUMA @ 2022-07-12 7:06 ` Zhao, Shirley 0 siblings, 0 replies; 16+ messages in thread From: Zhao, Shirley @ 2022-07-12 7:06 UTC (permalink / raw) To: Dr. David Alan Gilbert Cc: Thomas Huth, qemu-devel, virtio-fs, Stefan Hajnoczi Hi, all, I have another question want to consult you. To enable DAX in virtiofs, according to the memu https://virtio-fs.gitlab.io/howto-qemu.html. I need to add "cache-size=2G" as below. -device vhost-user-fs-pci,queue-size=1024,chardev=char0,tag=myfs,cache-size=2G My qemu command is: sudo qemu-system-x86_64 -M pc -cpu host --enable-kvm -smp 2 -m 4G -drive if=virtio,file=ubuntu.img -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/vhostqemu -device vhost-user-fs-pci,queue-size=1024,chardev=char0,tag=myfs_root,cache-size=2G -chardev stdio,mux=on,id=mon -mon chardev=mon,mode=readline -device virtio-serial-pci -device virtconsole,chardev=mon -vga none -display none And virtiofsd command is: sudo ./virtiofsd --socket-path=/tmp/vhostqemu -o source=/home/shirley/testdir -o cache=always But there is no option of "cache-size" in qemu 6.0, like below. So how to enable it? qemu-6.0.0$ qemu-system-x86_64 -device vhost-user-fs-pci,help vhost-user-fs-pci options: acpi-index=<uint32> - (default: 0) addr=<int32> - Slot and optional function number, example: 06.0 or 06 (default: -1) aer=<bool> - on/off (default: false) any_layout=<bool> - on/off (default: true) ats=<bool> - on/off (default: false) bootindex=<int32> chardev=<str> - ID of a chardev to use as a backend event_idx=<bool> - on/off (default: true) failover_pair_id=<str> indirect_desc=<bool> - on/off (default: true) iommu_platform=<bool> - on/off (default: false) migrate-extra=<bool> - on/off (default: true) modern-pio-notify=<bool> - on/off (default: false) multifunction=<bool> - on/off (default: false) notify_on_empty=<bool> - on/off (default: true) num-request-queues=<uint16> - (default: 1) packed=<bool> - on/off (default: false) page-per-vq=<bool> - on/off (default: false) queue-size=<uint16> - (default: 128) rombar=<uint32> - (default: 1) romfile=<str> romsize=<uint32> - (default: 4294967295) tag=<str> use-disabled-flag=<bool> - (default: true) use-started=<bool> - (default: true) vectors=<uint32> - (default: 4294967295) virtio-backend=<child<vhost-user-fs-device>> virtio-pci-bus-master-bug-migration=<bool> - on/off (default: false) x-ats-page-aligned=<bool> - on/off (default: true) x-disable-legacy-check=<bool> - (default: false) x-disable-pcie=<bool> - on/off (default: false) x-ignore-backend-features=<bool> - (default: false) x-pcie-deverr-init=<bool> - on/off (default: true) x-pcie-extcap-init=<bool> - on/off (default: true) x-pcie-flr-init=<bool> - on/off (default: true) x-pcie-lnkctl-init=<bool> - on/off (default: true) x-pcie-lnksta-dllla=<bool> - on/off (default: true) x-pcie-pm-init=<bool> - on/off (default: true) -----Original Message----- From: Zhao, Shirley Sent: Friday, July 8, 2022 8:40 AM To: Dr. David Alan Gilbert <dgilbert@redhat.com> Cc: Thomas Huth <thuth@redhat.com>; qemu-devel@nongnu.org; virtio-fs@redhat.com; Stefan Hajnoczi <stefanha@redhat.com> Subject: RE: [Qemu] how to use viriofs in qemu without NUMA Yes, the qemu version is too old. My previous qemu version is 4.2, and I upgraded it into 6.0, and it worked now. Thanks a lot. - Shirley -----Original Message----- From: Dr. David Alan Gilbert <dgilbert@redhat.com> Sent: Tuesday, July 5, 2022 5:37 PM To: Zhao, Shirley <shirley.zhao@intel.com> Cc: Thomas Huth <thuth@redhat.com>; qemu-devel@nongnu.org; virtio-fs@redhat.com; Stefan Hajnoczi <stefanha@redhat.com> Subject: Re: [Qemu] how to use viriofs in qemu without NUMA * Zhao, Shirley (shirley.zhao@intel.com) wrote: > 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 What error did it give? 20.04 is quite old, what qemu version is it? I'd have to check when the memdev= went in. Dave > > Thanks. > - Shirley > > -----Original Message----- > From: Dr. David Alan Gilbert <dgilbert@redhat.com> > Sent: Tuesday, July 5, 2022 4:04 PM > To: Thomas Huth <thuth@redhat.com> > Cc: Zhao, Shirley <shirley.zhao@intel.com>; qemu-devel@nongnu.org; > virtio-fs@redhat.com; Stefan Hajnoczi <stefanha@redhat.com> > Subject: Re: [Qemu] how to use viriofs in qemu without NUMA > > * Thomas Huth (thuth@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@redhat.com / Manchester, UK > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Virtio-fs] [Qemu] how to use viriofs in qemu without NUMA 2022-07-12 7:06 ` [Virtio-fs] " Zhao, Shirley (?) @ 2022-07-12 12:33 ` Vivek Goyal 2022-07-13 5:43 ` Zhao, Shirley -1 siblings, 1 reply; 16+ messages in thread From: Vivek Goyal @ 2022-07-12 12:33 UTC (permalink / raw) To: Zhao, Shirley; +Cc: Dr. David Alan Gilbert, virtio-fs, Thomas Huth, qemu-devel On Tue, Jul 12, 2022 at 07:06:50AM +0000, Zhao, Shirley wrote: > Hi, all, > > I have another question want to consult you. > To enable DAX in virtiofs, according to the memu https://virtio-fs.gitlab.io/howto-qemu.html. > I need to add "cache-size=2G" as below. > -device vhost-user-fs-pci,queue-size=1024,chardev=char0,tag=myfs,cache-size=2G > > My qemu command is: > sudo qemu-system-x86_64 -M pc -cpu host --enable-kvm -smp 2 -m 4G -drive if=virtio,file=ubuntu.img -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/vhostqemu -device vhost-user-fs-pci,queue-size=1024,chardev=char0,tag=myfs_root,cache-size=2G -chardev stdio,mux=on,id=mon -mon chardev=mon,mode=readline -device virtio-serial-pci -device virtconsole,chardev=mon -vga none -display none > > And virtiofsd command is: > sudo ./virtiofsd --socket-path=/tmp/vhostqemu -o source=/home/shirley/testdir -o cache=always > > But there is no option of "cache-size" in qemu 6.0, like below. So how to enable it? Hi Shirley, DAX support in qemu is not upstream yet. We are carrying DAX patches out of the tree on a branch here. https://gitlab.com/virtio-fs/qemu/-/commits/virtio-fs-dev There are some changes required and David Gilbert is looking into making these changes. I am hoping at some point of time these patches will make into upstream. So for the time being, to test DAX, you will have to fetch above branch, build it and use that qemu. Thanks Vivek > qemu-6.0.0$ qemu-system-x86_64 -device vhost-user-fs-pci,help > vhost-user-fs-pci options: > acpi-index=<uint32> - (default: 0) > addr=<int32> - Slot and optional function number, example: 06.0 or 06 (default: -1) > aer=<bool> - on/off (default: false) > any_layout=<bool> - on/off (default: true) > ats=<bool> - on/off (default: false) > bootindex=<int32> > chardev=<str> - ID of a chardev to use as a backend > event_idx=<bool> - on/off (default: true) > failover_pair_id=<str> > indirect_desc=<bool> - on/off (default: true) > iommu_platform=<bool> - on/off (default: false) > migrate-extra=<bool> - on/off (default: true) > modern-pio-notify=<bool> - on/off (default: false) > multifunction=<bool> - on/off (default: false) > notify_on_empty=<bool> - on/off (default: true) > num-request-queues=<uint16> - (default: 1) > packed=<bool> - on/off (default: false) > page-per-vq=<bool> - on/off (default: false) > queue-size=<uint16> - (default: 128) > rombar=<uint32> - (default: 1) > romfile=<str> > romsize=<uint32> - (default: 4294967295) > tag=<str> > use-disabled-flag=<bool> - (default: true) > use-started=<bool> - (default: true) > vectors=<uint32> - (default: 4294967295) > virtio-backend=<child<vhost-user-fs-device>> > virtio-pci-bus-master-bug-migration=<bool> - on/off (default: false) > x-ats-page-aligned=<bool> - on/off (default: true) > x-disable-legacy-check=<bool> - (default: false) > x-disable-pcie=<bool> - on/off (default: false) > x-ignore-backend-features=<bool> - (default: false) > x-pcie-deverr-init=<bool> - on/off (default: true) > x-pcie-extcap-init=<bool> - on/off (default: true) > x-pcie-flr-init=<bool> - on/off (default: true) > x-pcie-lnkctl-init=<bool> - on/off (default: true) > x-pcie-lnksta-dllla=<bool> - on/off (default: true) > x-pcie-pm-init=<bool> - on/off (default: true) > > > -----Original Message----- > From: Zhao, Shirley > Sent: Friday, July 8, 2022 8:40 AM > To: Dr. David Alan Gilbert <dgilbert@redhat.com> > Cc: Thomas Huth <thuth@redhat.com>; qemu-devel@nongnu.org; virtio-fs@redhat.com; Stefan Hajnoczi <stefanha@redhat.com> > Subject: RE: [Qemu] how to use viriofs in qemu without NUMA > > Yes, the qemu version is too old. > My previous qemu version is 4.2, and I upgraded it into 6.0, and it worked now. > Thanks a lot. > > - Shirley > > -----Original Message----- > From: Dr. David Alan Gilbert <dgilbert@redhat.com> > Sent: Tuesday, July 5, 2022 5:37 PM > To: Zhao, Shirley <shirley.zhao@intel.com> > Cc: Thomas Huth <thuth@redhat.com>; qemu-devel@nongnu.org; virtio-fs@redhat.com; Stefan Hajnoczi <stefanha@redhat.com> > Subject: Re: [Qemu] how to use viriofs in qemu without NUMA > > * Zhao, Shirley (shirley.zhao@intel.com) wrote: > > 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 > > What error did it give? > > 20.04 is quite old, what qemu version is it? > > I'd have to check when the memdev= went in. > > Dave > > > > > Thanks. > > - Shirley > > > > -----Original Message----- > > From: Dr. David Alan Gilbert <dgilbert@redhat.com> > > Sent: Tuesday, July 5, 2022 4:04 PM > > To: Thomas Huth <thuth@redhat.com> > > Cc: Zhao, Shirley <shirley.zhao@intel.com>; qemu-devel@nongnu.org; > > virtio-fs@redhat.com; Stefan Hajnoczi <stefanha@redhat.com> > > Subject: Re: [Qemu] how to use viriofs in qemu without NUMA > > > > * Thomas Huth (thuth@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@redhat.com / Manchester, UK > > > -- > Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK > > _______________________________________________ > Virtio-fs mailing list > Virtio-fs@redhat.com > https://listman.redhat.com/mailman/listinfo/virtio-fs ^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: [Virtio-fs] [Qemu] how to use viriofs in qemu without NUMA 2022-07-12 12:33 ` Vivek Goyal @ 2022-07-13 5:43 ` Zhao, Shirley 0 siblings, 0 replies; 16+ messages in thread From: Zhao, Shirley @ 2022-07-13 5:43 UTC (permalink / raw) To: Vivek Goyal; +Cc: Dr. David Alan Gilbert, virtio-fs, Thomas Huth, qemu-devel Get it, thanks for our information. Vivek. Thanks. - Shirley -----Original Message----- From: Vivek Goyal <vgoyal@redhat.com> Sent: Tuesday, July 12, 2022 8:33 PM To: Zhao, Shirley <shirley.zhao@intel.com> Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>; virtio-fs@redhat.com; Thomas Huth <thuth@redhat.com>; qemu-devel@nongnu.org Subject: Re: [Virtio-fs] [Qemu] how to use viriofs in qemu without NUMA On Tue, Jul 12, 2022 at 07:06:50AM +0000, Zhao, Shirley wrote: > Hi, all, > > I have another question want to consult you. > To enable DAX in virtiofs, according to the memu https://virtio-fs.gitlab.io/howto-qemu.html. > I need to add "cache-size=2G" as below. > -device > vhost-user-fs-pci,queue-size=1024,chardev=char0,tag=myfs,cache-size=2G > > My qemu command is: > sudo qemu-system-x86_64 -M pc -cpu host --enable-kvm -smp 2 -m 4G > -drive if=virtio,file=ubuntu.img -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/vhostqemu > -device > vhost-user-fs-pci,queue-size=1024,chardev=char0,tag=myfs_root,cache-si > ze=2G -chardev stdio,mux=on,id=mon -mon chardev=mon,mode=readline > -device virtio-serial-pci -device virtconsole,chardev=mon -vga none > -display none > > And virtiofsd command is: > sudo ./virtiofsd --socket-path=/tmp/vhostqemu -o > source=/home/shirley/testdir -o cache=always > > But there is no option of "cache-size" in qemu 6.0, like below. So how to enable it? Hi Shirley, DAX support in qemu is not upstream yet. We are carrying DAX patches out of the tree on a branch here. https://gitlab.com/virtio-fs/qemu/-/commits/virtio-fs-dev There are some changes required and David Gilbert is looking into making these changes. I am hoping at some point of time these patches will make into upstream. So for the time being, to test DAX, you will have to fetch above branch, build it and use that qemu. Thanks Vivek > qemu-6.0.0$ qemu-system-x86_64 -device vhost-user-fs-pci,help > vhost-user-fs-pci options: > acpi-index=<uint32> - (default: 0) > addr=<int32> - Slot and optional function number, example: 06.0 or 06 (default: -1) > aer=<bool> - on/off (default: false) > any_layout=<bool> - on/off (default: true) > ats=<bool> - on/off (default: false) > bootindex=<int32> > chardev=<str> - ID of a chardev to use as a backend > event_idx=<bool> - on/off (default: true) > failover_pair_id=<str> > indirect_desc=<bool> - on/off (default: true) > iommu_platform=<bool> - on/off (default: false) > migrate-extra=<bool> - on/off (default: true) > modern-pio-notify=<bool> - on/off (default: false) > multifunction=<bool> - on/off (default: false) > notify_on_empty=<bool> - on/off (default: true) > num-request-queues=<uint16> - (default: 1) > packed=<bool> - on/off (default: false) > page-per-vq=<bool> - on/off (default: false) > queue-size=<uint16> - (default: 128) > rombar=<uint32> - (default: 1) > romfile=<str> > romsize=<uint32> - (default: 4294967295) > tag=<str> > use-disabled-flag=<bool> - (default: true) > use-started=<bool> - (default: true) > vectors=<uint32> - (default: 4294967295) > virtio-backend=<child<vhost-user-fs-device>> > virtio-pci-bus-master-bug-migration=<bool> - on/off (default: false) > x-ats-page-aligned=<bool> - on/off (default: true) > x-disable-legacy-check=<bool> - (default: false) > x-disable-pcie=<bool> - on/off (default: false) > x-ignore-backend-features=<bool> - (default: false) > x-pcie-deverr-init=<bool> - on/off (default: true) > x-pcie-extcap-init=<bool> - on/off (default: true) > x-pcie-flr-init=<bool> - on/off (default: true) > x-pcie-lnkctl-init=<bool> - on/off (default: true) > x-pcie-lnksta-dllla=<bool> - on/off (default: true) > x-pcie-pm-init=<bool> - on/off (default: true) > > > -----Original Message----- > From: Zhao, Shirley > Sent: Friday, July 8, 2022 8:40 AM > To: Dr. David Alan Gilbert <dgilbert@redhat.com> > Cc: Thomas Huth <thuth@redhat.com>; qemu-devel@nongnu.org; > virtio-fs@redhat.com; Stefan Hajnoczi <stefanha@redhat.com> > Subject: RE: [Qemu] how to use viriofs in qemu without NUMA > > Yes, the qemu version is too old. > My previous qemu version is 4.2, and I upgraded it into 6.0, and it worked now. > Thanks a lot. > > - Shirley > > -----Original Message----- > From: Dr. David Alan Gilbert <dgilbert@redhat.com> > Sent: Tuesday, July 5, 2022 5:37 PM > To: Zhao, Shirley <shirley.zhao@intel.com> > Cc: Thomas Huth <thuth@redhat.com>; qemu-devel@nongnu.org; > virtio-fs@redhat.com; Stefan Hajnoczi <stefanha@redhat.com> > Subject: Re: [Qemu] how to use viriofs in qemu without NUMA > > * Zhao, Shirley (shirley.zhao@intel.com) wrote: > > 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 > > What error did it give? > > 20.04 is quite old, what qemu version is it? > > I'd have to check when the memdev= went in. > > Dave > > > > > Thanks. > > - Shirley > > > > -----Original Message----- > > From: Dr. David Alan Gilbert <dgilbert@redhat.com> > > Sent: Tuesday, July 5, 2022 4:04 PM > > To: Thomas Huth <thuth@redhat.com> > > Cc: Zhao, Shirley <shirley.zhao@intel.com>; qemu-devel@nongnu.org; > > virtio-fs@redhat.com; Stefan Hajnoczi <stefanha@redhat.com> > > Subject: Re: [Qemu] how to use viriofs in qemu without NUMA > > > > * Thomas Huth (thuth@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@redhat.com / Manchester, UK > > > -- > Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK > > _______________________________________________ > Virtio-fs mailing list > Virtio-fs@redhat.com > https://listman.redhat.com/mailman/listinfo/virtio-fs ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Virtio-fs] [Qemu] how to use viriofs in qemu without NUMA @ 2022-07-13 5:43 ` Zhao, Shirley 0 siblings, 0 replies; 16+ messages in thread From: Zhao, Shirley @ 2022-07-13 5:43 UTC (permalink / raw) To: Vivek Goyal; +Cc: Dr. David Alan Gilbert, virtio-fs, Thomas Huth, qemu-devel Get it, thanks for our information. Vivek. Thanks. - Shirley -----Original Message----- From: Vivek Goyal <vgoyal@redhat.com> Sent: Tuesday, July 12, 2022 8:33 PM To: Zhao, Shirley <shirley.zhao@intel.com> Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>; virtio-fs@redhat.com; Thomas Huth <thuth@redhat.com>; qemu-devel@nongnu.org Subject: Re: [Virtio-fs] [Qemu] how to use viriofs in qemu without NUMA On Tue, Jul 12, 2022 at 07:06:50AM +0000, Zhao, Shirley wrote: > Hi, all, > > I have another question want to consult you. > To enable DAX in virtiofs, according to the memu https://virtio-fs.gitlab.io/howto-qemu.html. > I need to add "cache-size=2G" as below. > -device > vhost-user-fs-pci,queue-size=1024,chardev=char0,tag=myfs,cache-size=2G > > My qemu command is: > sudo qemu-system-x86_64 -M pc -cpu host --enable-kvm -smp 2 -m 4G > -drive if=virtio,file=ubuntu.img -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/vhostqemu > -device > vhost-user-fs-pci,queue-size=1024,chardev=char0,tag=myfs_root,cache-si > ze=2G -chardev stdio,mux=on,id=mon -mon chardev=mon,mode=readline > -device virtio-serial-pci -device virtconsole,chardev=mon -vga none > -display none > > And virtiofsd command is: > sudo ./virtiofsd --socket-path=/tmp/vhostqemu -o > source=/home/shirley/testdir -o cache=always > > But there is no option of "cache-size" in qemu 6.0, like below. So how to enable it? Hi Shirley, DAX support in qemu is not upstream yet. We are carrying DAX patches out of the tree on a branch here. https://gitlab.com/virtio-fs/qemu/-/commits/virtio-fs-dev There are some changes required and David Gilbert is looking into making these changes. I am hoping at some point of time these patches will make into upstream. So for the time being, to test DAX, you will have to fetch above branch, build it and use that qemu. Thanks Vivek > qemu-6.0.0$ qemu-system-x86_64 -device vhost-user-fs-pci,help > vhost-user-fs-pci options: > acpi-index=<uint32> - (default: 0) > addr=<int32> - Slot and optional function number, example: 06.0 or 06 (default: -1) > aer=<bool> - on/off (default: false) > any_layout=<bool> - on/off (default: true) > ats=<bool> - on/off (default: false) > bootindex=<int32> > chardev=<str> - ID of a chardev to use as a backend > event_idx=<bool> - on/off (default: true) > failover_pair_id=<str> > indirect_desc=<bool> - on/off (default: true) > iommu_platform=<bool> - on/off (default: false) > migrate-extra=<bool> - on/off (default: true) > modern-pio-notify=<bool> - on/off (default: false) > multifunction=<bool> - on/off (default: false) > notify_on_empty=<bool> - on/off (default: true) > num-request-queues=<uint16> - (default: 1) > packed=<bool> - on/off (default: false) > page-per-vq=<bool> - on/off (default: false) > queue-size=<uint16> - (default: 128) > rombar=<uint32> - (default: 1) > romfile=<str> > romsize=<uint32> - (default: 4294967295) > tag=<str> > use-disabled-flag=<bool> - (default: true) > use-started=<bool> - (default: true) > vectors=<uint32> - (default: 4294967295) > virtio-backend=<child<vhost-user-fs-device>> > virtio-pci-bus-master-bug-migration=<bool> - on/off (default: false) > x-ats-page-aligned=<bool> - on/off (default: true) > x-disable-legacy-check=<bool> - (default: false) > x-disable-pcie=<bool> - on/off (default: false) > x-ignore-backend-features=<bool> - (default: false) > x-pcie-deverr-init=<bool> - on/off (default: true) > x-pcie-extcap-init=<bool> - on/off (default: true) > x-pcie-flr-init=<bool> - on/off (default: true) > x-pcie-lnkctl-init=<bool> - on/off (default: true) > x-pcie-lnksta-dllla=<bool> - on/off (default: true) > x-pcie-pm-init=<bool> - on/off (default: true) > > > -----Original Message----- > From: Zhao, Shirley > Sent: Friday, July 8, 2022 8:40 AM > To: Dr. David Alan Gilbert <dgilbert@redhat.com> > Cc: Thomas Huth <thuth@redhat.com>; qemu-devel@nongnu.org; > virtio-fs@redhat.com; Stefan Hajnoczi <stefanha@redhat.com> > Subject: RE: [Qemu] how to use viriofs in qemu without NUMA > > Yes, the qemu version is too old. > My previous qemu version is 4.2, and I upgraded it into 6.0, and it worked now. > Thanks a lot. > > - Shirley > > -----Original Message----- > From: Dr. David Alan Gilbert <dgilbert@redhat.com> > Sent: Tuesday, July 5, 2022 5:37 PM > To: Zhao, Shirley <shirley.zhao@intel.com> > Cc: Thomas Huth <thuth@redhat.com>; qemu-devel@nongnu.org; > virtio-fs@redhat.com; Stefan Hajnoczi <stefanha@redhat.com> > Subject: Re: [Qemu] how to use viriofs in qemu without NUMA > > * Zhao, Shirley (shirley.zhao@intel.com) wrote: > > 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 > > What error did it give? > > 20.04 is quite old, what qemu version is it? > > I'd have to check when the memdev= went in. > > Dave > > > > > Thanks. > > - Shirley > > > > -----Original Message----- > > From: Dr. David Alan Gilbert <dgilbert@redhat.com> > > Sent: Tuesday, July 5, 2022 4:04 PM > > To: Thomas Huth <thuth@redhat.com> > > Cc: Zhao, Shirley <shirley.zhao@intel.com>; qemu-devel@nongnu.org; > > virtio-fs@redhat.com; Stefan Hajnoczi <stefanha@redhat.com> > > Subject: Re: [Qemu] how to use viriofs in qemu without NUMA > > > > * Thomas Huth (thuth@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@redhat.com / Manchester, UK > > > -- > Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK > > _______________________________________________ > Virtio-fs mailing list > Virtio-fs@redhat.com > https://listman.redhat.com/mailman/listinfo/virtio-fs ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2022-07-13 5:48 UTC | newest] Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-07-05 1:02 [Qemu] how to use viriofs in qemu without NUMA Zhao, Shirley 2022-07-05 7:48 ` Thomas Huth 2022-07-05 7:48 ` [Virtio-fs] " Thomas Huth 2022-07-05 8:03 ` Dr. David Alan Gilbert 2022-07-05 8:03 ` [Virtio-fs] " Dr. David Alan Gilbert 2022-07-05 9:01 ` Zhao, Shirley 2022-07-05 9:01 ` [Virtio-fs] " Zhao, Shirley 2022-07-05 9:36 ` Dr. David Alan Gilbert 2022-07-05 9:36 ` [Virtio-fs] " Dr. David Alan Gilbert 2022-07-08 0:40 ` Zhao, Shirley 2022-07-08 0:40 ` [Virtio-fs] " Zhao, Shirley 2022-07-12 7:06 ` Zhao, Shirley 2022-07-12 7:06 ` [Virtio-fs] " Zhao, Shirley 2022-07-12 12:33 ` Vivek Goyal 2022-07-13 5:43 ` Zhao, Shirley 2022-07-13 5:43 ` Zhao, Shirley
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.