Re: [PATCH 7/6] virtio-rng: Add rate limiting options for virtio-RNG

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

 



On 02/19/13 14:21, John Ferlan wrote:
On 02/13/2013 11:28 AM, Peter Krempa wrote:
Qemu's implementation of virtio RNG supports rate limiting of the
entropy used. This patch exposes the option to tune this fucntionality.

s/fucntionality/functionality


This patch is based on qemu commit 904d6f588063fb5ad2b61998acdf1e73fb4

The rate limiting is exported in the XML as:
<devices>
   ...
   <rng model='virtio'>
     <rate period='1234'>4321</rate>
     <backend model='random'/>
   </rng>
   ...
---
  docs/formatdomain.html.in                              |  9 +++++++++
  docs/schemas/domaincommon.rng                          | 18 +++++++++++++++++-
  src/conf/domain_conf.c                                 | 17 +++++++++++++++++
  src/conf/domain_conf.h                                 |  2 ++
  src/qemu/qemu_command.c                                |  8 ++++++++
  .../qemuxml2argv-virtio-rng-random.args                |  2 +-
  .../qemuxml2argv-virtio-rng-random.xml                 |  1 +
  7 files changed, 55 insertions(+), 2 deletions(-)

diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index e8cd086..b264460 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -4293,6 +4293,7 @@ qemu-kvm -net nic,model=? /dev/null
    ...
    &lt;devices&gt;
      &lt;rng model='virtio'&gt;
+      &lt;rate period="2000"&gt;1234&lt;/rate&gt;
        &lt;backend model='random'&gt;/dev/random&lt;/backend&gt;
        &lt;!-- OR --&gt;
        &lt;backend model='egd' type='udp'&gt;
@@ -4315,6 +4316,14 @@ qemu-kvm -net nic,model=? /dev/null
            <li>'virtio' &mdash; supported by qemu and virtio-rng kernel module</li>
          </ul>
        </dd>
+      <dt><code>rate</code></dt>
+      <dd>
+        <p>
+          The rate parameter allows to limit the rate that the entropy can be
+          read from the source. The value is in bits that the device is allowed
+          to read in the selected period. The default period is 1000ms or 1 second.
+        </p>
+      </dd>

bits or bytes?


qemu uses bits for it's configuration value. As the expected data rades are pretty low, I think bits can be used and potentially divided to larger values if needed.

Peter

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]