qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] virtio-scsi/blk dataplane and guest memory allocation


From: Fam Zheng
Subject: Re: [Qemu-devel] virtio-scsi/blk dataplane and guest memory allocation
Date: Thu, 21 Jan 2016 11:53:03 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

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:

    <domain>
        ...
      <iothreads>1</iothreads>
      ...
      <devices>
        ...
        <disk type='file' device='disk'>
          <driver name='qemu' type='qcow2' iothread='1'/>
          ...
        </disk>
      </devices>
    </domain>

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 <error_fatal>) 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]