From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47656) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xyvqt-0000CO-9i for qemu-devel@nongnu.org; Wed, 10 Dec 2014 23:59:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xyvqm-0002Ag-Sd for qemu-devel@nongnu.org; Wed, 10 Dec 2014 23:59:47 -0500 Received: from szxga01-in.huawei.com ([119.145.14.64]:52423) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xyvqm-0002AF-8n for qemu-devel@nongnu.org; Wed, 10 Dec 2014 23:59:40 -0500 Message-ID: <548924A6.7010907@huawei.com> Date: Thu, 11 Dec 2014 12:59:18 +0800 From: Linhaifeng MIME-Version: 1.0 References: <54890B3F.7010306@huawei.com> In-Reply-To: <54890B3F.7010306@huawei.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] vhost_user: How to send memory info List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: liuyongan@huawei.com, lilijun , "n.nikolaev@virtualopensystems.com >> Nikolay Nikolaev" , "Michael S. Tsirkin" On 2014/12/11 11:10, Linhaifeng wrote: > Hi,all > > Yestoday i tested the set_mem_table message found that qemu not send all the memory info(fd and size) when > VM memory size is 2G and have two numa nodes(two hugepage files).If VM memory size is 4G and have two numa nodes > will send all the memory info. > > Here is my understand,is this right? > If qemu not send all the memory infomation about hugepage files,vhost-user couldn't map all the VM memory. > If vhost-user couldn't map all the VM memory vhost-user maybe couldn't read the packets which allocate by Guest. > > > 1.Information about VM who has 2G and two numa nodes(vhost-user couldn't read the packets from tx_ring of Guest): > xml: > > > > > > > > > > > > > > > > > > qemu command: > -m 2048 -smp 2,sockets=2,cores=1,threads=1 > -object memory-backend-file,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,share=on,size=1024M,id=ram-node0 -numa node,nodeid=0,cpus=0,memdev=ram-node0 > -object memory-backend-file,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,share=on,size=1024M,id=ram-node1 -numa node,nodeid=1,cpus=1,memdev=ram-node1 > > > memory regions: > gpa = 0xC0000 > size = 2146697216 > ua = 0x2aaaaacc0000 > offset = 786432 > > gpa = 0x0 > size = 655360 > ua = 0x2aaaaac00000 > offset = 0 > > hugepage: > cat /proc/pidof qemu/maps > 2aaaaac00000-2aaaeac00000 rw-s 00000000 00:18 10357788 /dev/hugepages/libvirt/qemu/qemu_back_mem._objects_ram-node0.MvcPyi (deleted) > 2aaaeac00000-2aab2ac00000 rw-s 00000000 00:18 10357789 /dev/hugepages/libvirt/qemu/qemu_back_mem._objects_ram-node1.tjAVin (deleted) > > The memory size of each region is not match to the size of each hugepage file,is this ok?How does vhost-user to mmap all the hugepage? > > 2.Information about VM who has 4G and two numa nodes(vhost-user could read the packets from tx_ring of Guest): > xml: > > > > > > > > > > > > > > qemu command: > -m 4096 -smp 2,sockets=2,cores=1,threads=1 > -object memory-backend-file,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,share=on,size=2048M,id=ram-node0 -numa node,nodeid=0,cpus=0,memdev=ram-node0 > -object memory-backend-file,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,share=on,size=2048M,id=ram-node1 -numa node,nodeid=1,cpus=1,memdev=ram-node1 > > memory regions: > gpa = 0xC0000 > size = 3220439040 > ua = 0x2aaaaacc0000 > offset = 786432 > > gpa = 0x100000000 > size = 1073741824 > ua = 0x2aab6ac00000 > offset = 1073741824 > > gpa = 0x0 > size = 655360 > ua = 0x2aaaaac00000 > offset = 0 > > hugepage: > cat /proc/pidof qemu/maps > 2aaaaac00000-2aab2ac00000 rw-s 00000000 00:18 10756623 /dev/hugepages/libvirt/qemu/qemu_back_mem._objects_ram-node0.If4Qkf (deleted) > 2aab2ac00000-2aabaac00000 rw-s 00000000 00:18 10756624 /dev/hugepages/libvirt/qemu/qemu_back_mem._objects_ram-node1.jQZPcI (deleted) > -- Regards, Haifeng