[PATCH 24/32] docs: formatdomain-devices: Split out <memballoon>

Peter Krempa pkrempa at redhat.com
Thu Jul 23 13:21:29 UTC 2020


Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 docs/formatdomain-devices-memballoon.rst | 69 +++++++++++++++++++++++
 docs/formatdomain-devices.rst            | 71 +-----------------------
 docs/meson.build                         |  1 +
 3 files changed, 71 insertions(+), 70 deletions(-)
 create mode 100644 docs/formatdomain-devices-memballoon.rst

diff --git a/docs/formatdomain-devices-memballoon.rst b/docs/formatdomain-devices-memballoon.rst
new file mode 100644
index 0000000000..39ec180c68
--- /dev/null
+++ b/docs/formatdomain-devices-memballoon.rst
@@ -0,0 +1,69 @@
+:anchor:`<a id="elementsMemBalloon"/>`
+
+Memory balloon device
+~~~~~~~~~~~~~~~~~~~~~
+
+A virtual memory balloon device is added to all Xen and KVM/QEMU guests. It will
+be seen as ``memballoon`` element. It will be automatically added when
+appropriate, so there is no need to explicitly add this element in the guest XML
+unless a specific PCI slot needs to be assigned. :since:`Since 0.8.3, Xen, QEMU
+and KVM only` Additionally, :since:`since 0.8.4` , if the memballoon device
+needs to be explicitly disabled, ``model='none'`` may be used.
+
+Example: automatically added device with KVM
+
+::
+
+   ...
+   <devices>
+     <memballoon model='virtio'/>
+   </devices>
+   ...
+
+Example: manually added device with static PCI slot 2 requested
+
+::
+
+     ...
+     <devices>
+       <memballoon model='virtio'>
+         <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+         <stats period='10'/>
+         <driver iommu='on' ats='on'/>
+       </memballoon>
+     </devices>
+   </domain>
+
+``model``
+   The required ``model`` attribute specifies what type of balloon device is
+   provided. Valid values are specific to the virtualization platform
+
+   -  'virtio' - default with QEMU/KVM
+   -  'virtio-transitional' :since:`Since 5.2.0`
+   -  'virtio-non-transitional' :since:`Since 5.2.0`
+   -  'xen' - default with Xen
+
+   See `Virtio transitional devices <#elementsVirtioTransitional>`__ for more
+   details.
+
+``autodeflate``
+   The optional ``autodeflate`` attribute allows to enable/disable (values
+   "on"/"off", respectively) the ability of the QEMU virtio memory balloon to
+   release some memory at the last moment before a guest's process get killed by
+   Out of Memory killer. :since:`Since 1.3.1, QEMU and KVM only`
+
+``period``
+   The optional ``period`` allows the QEMU virtio memory balloon driver to
+   provide statistics through the ``virsh dommemstat           [domain]``
+   command. By default, collection is not enabled. In order to enable, use the
+   ``virsh dommemstat [domain] --period           [number]`` command or
+   ``virsh edit`` command to add the option to the XML definition. The
+   ``virsh dommemstat`` will accept the options ``--live``, ``--current``, or
+   ``--config``. If an option is not provided, the change for a running domain
+   will only be made to the active guest. If the QEMU driver is not at the right
+   revision, the attempt to set the period will fail. Large values (e.g. many
+   years) might be ignored. :since:`Since 1.1.1, requires QEMU 1.5`
+
+``driver``
+   For model ``virtio`` memballoon, `Virtio-specific
+   options <#elementsVirtio>`__ can also be set. ( :since:`Since 3.5.0` )
diff --git a/docs/formatdomain-devices.rst b/docs/formatdomain-devices.rst
index 819c05e531..35d1f0681a 100644
--- a/docs/formatdomain-devices.rst
+++ b/docs/formatdomain-devices.rst
@@ -56,76 +56,7 @@ following characters: ``[a-zA-Z0-9_-]``. :since:`Since 3.9.0`
 .. include:: formatdomain-devices-chardev.rst
 .. include:: formatdomain-devices-sound.rst
 .. include:: formatdomain-devices-watchdog.rst
-
-:anchor:`<a id="elementsMemBalloon"/>`
-
-Memory balloon device
-~~~~~~~~~~~~~~~~~~~~~
-
-A virtual memory balloon device is added to all Xen and KVM/QEMU guests. It will
-be seen as ``memballoon`` element. It will be automatically added when
-appropriate, so there is no need to explicitly add this element in the guest XML
-unless a specific PCI slot needs to be assigned. :since:`Since 0.8.3, Xen, QEMU
-and KVM only` Additionally, :since:`since 0.8.4` , if the memballoon device
-needs to be explicitly disabled, ``model='none'`` may be used.
-
-Example: automatically added device with KVM
-
-::
-
-   ...
-   <devices>
-     <memballoon model='virtio'/>
-   </devices>
-   ...
-
-Example: manually added device with static PCI slot 2 requested
-
-::
-
-     ...
-     <devices>
-       <memballoon model='virtio'>
-         <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
-         <stats period='10'/>
-         <driver iommu='on' ats='on'/>
-       </memballoon>
-     </devices>
-   </domain>
-
-``model``
-   The required ``model`` attribute specifies what type of balloon device is
-   provided. Valid values are specific to the virtualization platform
-
-   -  'virtio' - default with QEMU/KVM
-   -  'virtio-transitional' :since:`Since 5.2.0`
-   -  'virtio-non-transitional' :since:`Since 5.2.0`
-   -  'xen' - default with Xen
-
-   See `Virtio transitional devices <#elementsVirtioTransitional>`__ for more
-   details.
-
-``autodeflate``
-   The optional ``autodeflate`` attribute allows to enable/disable (values
-   "on"/"off", respectively) the ability of the QEMU virtio memory balloon to
-   release some memory at the last moment before a guest's process get killed by
-   Out of Memory killer. :since:`Since 1.3.1, QEMU and KVM only`
-
-``period``
-   The optional ``period`` allows the QEMU virtio memory balloon driver to
-   provide statistics through the ``virsh dommemstat           [domain]``
-   command. By default, collection is not enabled. In order to enable, use the
-   ``virsh dommemstat [domain] --period           [number]`` command or
-   ``virsh edit`` command to add the option to the XML definition. The
-   ``virsh dommemstat`` will accept the options ``--live``, ``--current``, or
-   ``--config``. If an option is not provided, the change for a running domain
-   will only be made to the active guest. If the QEMU driver is not at the right
-   revision, the attempt to set the period will fail. Large values (e.g. many
-   years) might be ignored. :since:`Since 1.1.1, requires QEMU 1.5`
-
-``driver``
-   For model ``virtio`` memballoon, `Virtio-specific
-   options <#elementsVirtio>`__ can also be set. ( :since:`Since 3.5.0` )
+.. include:: formatdomain-devices-memballoon.rst

 :anchor:`<a id="elementsRng"/>`

diff --git a/docs/meson.build b/docs/meson.build
index 21dcd589d7..49f81cd687 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -141,6 +141,7 @@ docs_rst_files = [
                   'formatdomain-devices-chardev.rst',
                   'formatdomain-devices-sound.rst',
                   'formatdomain-devices-watchdog.rst',
+                  'formatdomain-devices-memballoon.rst',
                 ]
   },
   { 'name': 'hacking' },
-- 
2.26.2




More information about the libvir-list mailing list