All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: Roy Shterman <roy.shterman@gmail.com>
Cc: qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] virtio-scsi/blk dataplane and guest memory allocation
Date: Thu, 21 Jan 2016 11:53:03 +0800	[thread overview]
Message-ID: <20160121035303.GB31960@ad.usersys.redhat.com> (raw)
In-Reply-To: <CAOBqJ55v7zZN-g7ezAhBgmnDf6x6ksw2_W=6Xxi3FH_Vf_timg@mail.gmail.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:

    <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	other threads:[~2016-01-21  3:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-20 20:12 [Qemu-devel] virtio-scsi/blk dataplane and guest memory allocation Roy Shterman
2016-01-21  3:53 ` Fam Zheng [this message]
2016-01-21  9:01 ` Paolo Bonzini
2016-01-27 19:03   ` Roy Shterman
2016-01-28  1:24     ` Fam Zheng
2016-01-28  7:28     ` Roy Shterman
2016-01-28  7:38       ` Fam Zheng
2016-01-28  8:46       ` Paolo Bonzini
2016-01-28  8:53         ` Daniel P. Berrange
2016-01-30  8:29           ` Roy Shterman
2016-01-30  8:33             ` Roy Shterman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160121035303.GB31960@ad.usersys.redhat.com \
    --to=famz@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=roy.shterman@gmail.com \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.