Regards
_Sugesh

From: discuss [mailto:discuss-boun...@openvswitch.org] On Behalf Of Charlie Li
Sent: Tuesday, August 2, 2016 4:28 PM
To: discuss@openvswitch.org
Subject: [ovs-discuss] unable to map backing store for hugepages: Cannot 
allocate memory

Hi All,

I am trying to use dpdkvhostuser to pass traffic to VM.

Here is my basic system configuration.

Host and VM OS: Fedora server 23
DPDK 2.2.0
OVS 2.50
QEMU 2.4.1

When I tried to start the VM, it got the following error:

qemu-system-x86_64: -object 
memory-backend-file,id=mem,size=3072M,mem-path=/dev/hugepages,share=on: unable 
to map backing store for hugepages: Cannot allocate memory

I must did some thing wrong.
Any help is appreciated.

Thanks,

Charlie

More details
-------------------------------------------------------------------------------------------------------------------

[cli@cli-desktop ~]$ grep Huge /proc/meminfo
AnonHugePages:         0 kB
HugePages_Total:       4
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:    1048576 kB

[cli@cli-desktop utilities]$ sudo ./ovs-vsctl show
4fcf27a6-edbd-4770-ab39-f440e3532bcc
    Bridge "br0"
        Port "vhost0"
            Interface "vhost0"
                type: dpdkvhostuser
        Port "vhost1"
            Interface "vhost1"
                type: dpdkvhostuser
        Port "br0"
            Interface "br0"
                type: internal
        Port "dpdk1"
            Interface "dpdk1"
                type: dpdk
        Port "dpdk0"
            Interface "dpdk0"
                type: dpdk

[cli@cli-desktop utilities]$ sudo ./ovs-vsctl list-ports br0
dpdk0
dpdk1
vhost0
vhost1

[cli@cli-desktop utilities]$ sudo ./ovs-ofctl dump-flows br0
NXST_FLOW reply (xid=0x4):
 cookie=0x0, duration=61391.667s, table=0, n_packets=0, n_bytes=0, 
idle_age=61391, in_port=1 actions=output:3
 cookie=0x0, duration=61391.650s, table=0, n_packets=0, n_bytes=0, 
idle_age=61391, in_port=2 actions=output:4
 cookie=0x0, duration=61391.632s, table=0, n_packets=0, n_bytes=0, 
idle_age=61391, in_port=3 actions=output:1
 cookie=0x0, duration=61391.616s, table=0, n_packets=0, n_bytes=0, 
idle_age=61391, in_port=4 actions=output:2

[cli@cli-desktop utilities]$ sudo qemu-system-x86_64 -m 3072 -cpu host -hda 
/home/cli/VM1/FC23.qcow2 -boot c -enable-kvm -pidfile /home/cli/VM1/vm1.pid 
-monitor unix:/home/cli/VM1/vm1monitor,server,nowait -name 'FC23-VM1' -net none 
-no-reboot -object 
memory-backend-file,id=mem,size=3072M,mem-path=/dev/hugepages,share=on -numa 
node,memdev=mem -mem-prealloc -chardev 
socket,id=char1,path=/usr/local/var/run/openvswitch/vhost0 -netdev 
type=vhost-user,id=net1,chardev=char1,vhostforce -device 
virtio-net-pci,netdev=net1,mac=00:00:00:00:00:01,csum=off,gso=off,guest_tso4=off,guest_tso6=off,guest_ecn=off,mrg_rxbuf=off
 -chardev socket,id=char2,path=/usr/local/var/run/openvswitch/vhost1 -netdev 
type=vhost-user,id=net2,chardev=char2,vhostforce -device 
virtio-net-pci,netdev=net2,mac=00:00:00:00:00:02,csum=off,gso=off,guest_tso4=off,guest_tso6=off,guest_ecn=off,mrg_rxbuf=off
 --nographic -vnc :14

qemu-system-x86_64: -object 
memory-backend-file,id=mem,size=3072M,mem-path=/dev/hugepages,share=on: unable 
to map backing store for hugepages: Cannot allocate m/emory
[Sugesh] May be you are out of hugepages? How much memory you are allocating 
for OVS-DPDK?


_______________________________________________
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to