All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: Roy Shterman <roy.shterman@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] virtio-scsi/blk dataplane and guest memory allocation
Date: Thu, 28 Jan 2016 09:24:02 +0800	[thread overview]
Message-ID: <20160128012402.GA7877@ad.usersys.redhat.com> (raw)
In-Reply-To: <CAOBqJ555+HXTT0UadkxCErTPe2MV-KzTkLcpdLEG=gLh1=+x2Q@mail.gmail.com>

On Wed, 01/27 21:03, Roy Shterman wrote:
> Hi,
> 
> First of all thank very much for your help,
> 
> Second, unfortunately data-plane didn't worked well, I tried to add threads
> from the instructions you gave me.
> 
> Here is my full xml file, maybe you can help me to understand why it didn't
> worked :

Did you specify iothread in the xml?

> 
> <domain type='kvm'>
>   <name>gen-r-vrt-105-007-RH7.0x64</name>
>   <uuid>8f79e97e-d452-4577-82bd-2ed903773026</uuid>
>   <memory unit='KiB'>2097152</memory>
>   <currentMemory unit='KiB'>2097152</currentMemory>
>   <memtune>
>     <hard_limit unit='KiB'>8388608</hard_limit>
>   </memtune>
>   <memoryBacking>
>     <locked/>
>   </memoryBacking>
>   <vcpu placement='static'>2</vcpu>
>   <os>
>     <type arch='x86_64' machine='pc-i440fx-2.5'>hvm</type>
>     <boot dev='hd'/>
>   </os>
>   <features>
>     <acpi/>
>     <apic/>
>     <pae/>
>   </features>
>   <clock offset='utc'/>
>   <on_poweroff>destroy</on_poweroff>
>   <on_reboot>restart</on_reboot>
>   <on_crash>restart</on_crash>

Add

    <iothreads>1</iothreads>

>   <devices>
> 
> <emulator>/.autodirect/mtrswgwork/roysh/git/qemu/x86_64-softmmu/qemu-system-x86_64</emulator>
>     <disk type='file' device='disk'>
>       <driver name='qemu' type='qcow2' cache='none'/>

and change these lines to:

        <driver name='qemu' type='qcow2' cache='none' iothread='1'/>

Fam

>       <source file='/images/gen-r-vrt-105-007/gen-r-vrt-105-007.img'/>
>       <target dev='vda' bus='virtio'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
> function='0x0'/>
>     </disk>
>     <disk type='network' device='lun'>
>       <driver name='qemu' type='raw'/>
>       <source protocol='iscsi' name='iqn.2001-04.com.r-dcs03-tgt-3/1/iser'>
>         <host name='11.212.32.52' port='3260'/>
>       </source>
>       <target dev='vdb' bus='virtio'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x07'
> function='0x0'/>
>     </disk>
>     <disk type='network' device='lun'>
>       <driver name='qemu' type='raw'/>
>       <source protocol='iscsi' name='iqn.2001-04.com.r-dcs03-tgt-1/1'>
>         <host name='11.212.32.52' port='3260'/>
>       </source>
>       <target dev='sda' bus='scsi'/>
>       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
>     </disk>
>     <disk type='network' device='lun'>
>       <driver name='qemu' type='raw'/>
>       <source protocol='iscsi' name='iqn.2001-04.com.r-dcs03-tgt-2/1'>
>         <host name='11.212.32.52' port='3260'/>
>       </source>
>       <target dev='sdb' bus='scsi'/>
>       <address type='drive' controller='1' bus='0' target='0' unit='0'/>
>     </disk>
>     <controller type='scsi' index='0' model='virtio-scsi'>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x06'
> function='0x0'/>
>     </controller>
>     <controller type='scsi' index='1' model='virtio-scsi'>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x08'
> function='0x0'/>
>     </controller>
>     <controller type='usb' index='0'>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
> function='0x2'/>
>     </controller>
>     <controller type='pci' index='0' model='pci-root'/>
>     <interface type='bridge'>
>       <mac address='00:50:56:28:69:07'/>
>       <source bridge='br0:'/>
>       <model type='e1000'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
> function='0x0'/>
>     </interface>
>     <serial type='pty'>
>       <target port='0'/>
>     </serial>
>     <console type='pty'>
>       <target type='serial' port='0'/>
>     </console>
>     <input type='tablet' bus='usb'/>
>     <input type='mouse' bus='ps2'/>
>     <graphics type='vnc' port='-1' autoport='yes'/>
>     <video>
>       <model type='cirrus' vram='9216' heads='1'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x02'
> function='0x0'/>
>     </video>
>     <memballoon model='virtio'>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x05'
> function='0x0'/>
>     </memballoon>
>   </devices>
> </domain>
> 
> BTW, in RH 7.2 data-plane is default if one is choosing to work with virtio?
> 
> Thank you very much,
> Roy
> 
> On Thu, Jan 21, 2016 at 11:01 AM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> 
> >
> >
> > On 20/01/2016 21:12, Roy Shterman wrote:
> > > Hi,
> > >
> > > I have two questions,
> > >
> > > First, I'm developing for Libiscsi and trying to work with virtio-scsi
> > > dataplane or even virtio-blk dataplane and it doesn't works well.
> > >
> > > I'm working with latest qemu and latest Libiscsi in RedHat 7 libvirt
> > > package.
> > >
> > > my iscsi xml part is :
> > >
> > > virtio-blk -
> > >
> > >     <disk type='network' device='lun'>
> > >       <driver name='qemu' type='raw'/>
> > >       <source protocol='iscsi' name='iqn.2001-04.com.r-dcs03-tgt-3/1'>
> > >         <host name='11.212.32.52' port='3260'/>
> > >       </source>
> > >       <target dev='vdb' bus='virtio'/>
> > >       <address type='pci' domain='0x0000' bus='0x00' slot='0x07'
> > > function='0x0'/>
> > >     </disk>
> > >
> > > virtio-scsi -
> > >
> > >     <disk type='network' device='lun'>
> > >       <driver name='qemu' type='raw'/>
> > >       <source protocol='iscsi' name='iqn.2001-04.com.r-dcs03-tgt-1/1>
> > >         <host name='11.212.32.52' port='3260'/>
> > >       </source>
> > >       <target dev='sda' bus='scsi'/>
> > >       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
> > >     </disk>
> > >     <controller type='scsi' index='0' model='virtio-scsi'>
> > >       <address type='pci' domain='0x0000' bus='0x00' slot='0x06'
> > > function='0x0'/>
> > >     </controller>
> >
> > There is now support for dataplane in libvirt.  See
> > https://libvirt.org/formatdomain.html#elementsIOThreadsAllocation and
> > then you can add an iothread='NN' (NN is a number) to the <driver
> > name='qemu' type='raw'/> element.
> >
> > > second thing, I'm trying to look for the code where QEMU allocate all
> > > guest memory (2 GB) in my case.
> >
> > Start at memory_allocate_system_memory; ultimately you'll reach
> > qemu_anon_ram_alloc which is basically an mmap.
> >
> > paolo
> >

  reply	other threads:[~2016-01-28  1:24 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
2016-01-21  9:01 ` Paolo Bonzini
2016-01-27 19:03   ` Roy Shterman
2016-01-28  1:24     ` Fam Zheng [this message]
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=20160128012402.GA7877@ad.usersys.redhat.com \
    --to=famz@redhat.com \
    --cc=pbonzini@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.