From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aM6J6-0004vw-7N for qemu-devel@nongnu.org; Wed, 20 Jan 2016 22:53:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aM6J2-0003ZJ-6Q for qemu-devel@nongnu.org; Wed, 20 Jan 2016 22:53:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40386) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aM6J2-0003Z3-0h for qemu-devel@nongnu.org; Wed, 20 Jan 2016 22:53:08 -0500 Date: Thu, 21 Jan 2016 11:53:03 +0800 From: Fam Zheng Message-ID: <20160121035303.GB31960@ad.usersys.redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] virtio-scsi/blk dataplane and guest memory allocation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Roy Shterman Cc: qemu-devel@nongnu.org, stefanha@redhat.com On Wed, 01/20 22:12, Roy Shterman wrote: > and nothing happened, can you think of something i'm missing? The "x-data-plane=on" option used to be the temporary flag and has been removed since last release of QEMU. In the command line, the syntax to use dataplane for virtio-blk/scsi is: -object iothread,id=iothread0 \ -device virtio-{blk,scsi}-pci,iothread=iothread0,$your_usual_opts In libvirt xml, you need to define "iothread" objects, and assign to devices: ... 1 ... ... ... I haven't tried virtio-scsi dataplane with libvirt on my own, and I don't know if it is supported there (note: even though in QEMU it is configurable, dataplane is not completely thread safe, so be careful). > second thing, I'm trying to look for the code where QEMU allocate all > guest memory (2 GB) in my case. The guest ram is allocated by the machine in the most simple case: (gdb) bt #0 memory_region_init_ram (mr=0x55555658d9c0, owner=0x0, name=0x555555b05a6f "pc.ram", size=4294967296, errp=0x5555564aa770 ) at /home/fam/work/qemu/memory.c:1226 #1 0x0000555555720f2c in allocate_system_memory_nonnuma (mr=0x55555658d9c0, owner=0x0, name=0x555555b05a6f "pc.ram", ram_size=4294967296) at /home/fam/work/qemu/numa.c:434 #2 0x0000555555720f9b in memory_region_allocate_system_memory (mr=0x55555658d9c0, owner=0x0, name=0x555555b05a6f "pc.ram", ram_size=4294967296) at /home/fam/work/qemu/numa.c:447 #3 0x000055555579092d in pc_memory_init (pcms=0x55555652e280, system_memory=0x555556531280, rom_memory=0x55555658cfd0, ram_memory=0x7fffffffdce8, guest_info=0x55555658d570) at /home/fam/work/qemu/hw/i386/pc.c:1307 #4 0x0000555555792f90 in pc_init1 (machine=0x55555652e280, host_type=0x555555b064f0 "i440FX-pcihost", pci_type=0x555555b064e9 "i440FX") at /home/fam/work/qemu/hw/i386/pc_piix.c:164 #5 0x00005555557939c2 in pc_init_v2_6 (machine=0x55555652e280) at /home/fam/work/qemu/hw/i386/pc_piix.c:429 #6 0x000055555583cf24 in main (argc=3, argv=0x7fffffffe1c8, envp=0x7fffffffe1e8) at /home/fam/work/qemu/vl.c:4511 Fam