mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: domain I/O asynchronous handling
For virtio disks and interfaces, qemu allows users to enable or disable ioeventfd feature. This means, qemu can execute domain code, while another thread waits for I/O event. Basically, in some cases it is win, in some loss. This feature is available via 'ioeventfd' attribute in disk and interface <driver> element. It accepts 'on' and 'off'. Leaving this attribute out defaults to hypervisor decision.
This commit is contained in:
@@ -785,7 +785,7 @@
|
||||
</disk>
|
||||
...
|
||||
<disk type='network'>
|
||||
<driver name="qemu" type="raw" io="threads"/>
|
||||
<driver name="qemu" type="raw" io="threads" ioeventfd="on"/>
|
||||
<source protocol="sheepdog" name="image_name">
|
||||
<host name="hostname" port="7000"/>
|
||||
</source>
|
||||
@@ -869,6 +869,20 @@
|
||||
policies on I/O; qemu guests support "threads" and
|
||||
"native". <span class="since">Since 0.8.8</span>
|
||||
</li>
|
||||
<li>
|
||||
The optional <code>ioeventfd</code> attribute allows users to
|
||||
set <a href='https://patchwork.kernel.org/patch/43390/'>
|
||||
domain I/O asynchronous handling</a> for disk device.
|
||||
The default is left to the discretion of the hypervisor.
|
||||
Accepted values are "on" and "off". Enabling this allows
|
||||
qemu to execute VM while a separate thread handles I/O.
|
||||
Typically guests experiencing high system CPU utilization
|
||||
during I/O will benefit from this. On the other hand,
|
||||
on overloaded host it could increase guest I/O latency.
|
||||
<span class="since">Since 0.9.3 (QEMU and KVM only)</span>
|
||||
<b>In general you should leave this option alone, unless you
|
||||
are very certain you know what you are doing.</b>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt><code>boot</code></dt>
|
||||
@@ -1649,7 +1663,7 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
<source network='default'/>
|
||||
<target dev='vnet1'/>
|
||||
<model type='virtio'/>
|
||||
<b><driver name='vhost' txmode='iothread'/></b>
|
||||
<b><driver name='vhost' txmode='iothread' ioeventfd='on'/></b>
|
||||
</interface>
|
||||
</devices>
|
||||
...</pre>
|
||||
@@ -1697,6 +1711,22 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
contention since the cpu doing the tx isn't necessarily the
|
||||
cpu where the guest generated the packets."<br/><br/>
|
||||
|
||||
<b>In general you should leave this option alone, unless you
|
||||
are very certain you know what you are doing.</b>
|
||||
</dd>
|
||||
<dt><code>ioeventfd</code></dt>
|
||||
<dd>
|
||||
This optional attribute allows users to set
|
||||
<a href='https://patchwork.kernel.org/patch/43390/'>
|
||||
domain I/O asynchronous handling</a> for interface device.
|
||||
The default is left to the discretion of the hypervisor.
|
||||
Accepted values are "on" and "off". Enabling this allows
|
||||
qemu to execute VM while a separate thread handles I/O.
|
||||
Typically guests experiencing high system CPU utilization
|
||||
during I/O will benefit from this. On the other hand,
|
||||
on overloaded host it could increase guest I/O latency.
|
||||
<span class="since">Since 0.9.3 (QEMU and KVM only)</span><br/><br/>
|
||||
|
||||
<b>In general you should leave this option alone, unless you
|
||||
are very certain you know what you are doing.</b>
|
||||
</dd>
|
||||
|
||||
@@ -778,6 +778,9 @@
|
||||
<optional>
|
||||
<ref name="driverIO"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="ioeventfd"/>
|
||||
</optional>
|
||||
<empty/>
|
||||
</element>
|
||||
</define>
|
||||
@@ -817,6 +820,14 @@
|
||||
</choice>
|
||||
</attribute>
|
||||
</define>
|
||||
<define name="ioeventfd">
|
||||
<attribute name="ioeventfd">
|
||||
<choice>
|
||||
<value>on</value>
|
||||
<value>off</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</define>
|
||||
<define name="controller">
|
||||
<element name="controller">
|
||||
<choice>
|
||||
@@ -1117,6 +1128,9 @@
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="ioeventfd"/>
|
||||
</optional>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
|
||||
Reference in New Issue
Block a user