[PATCH] formatdomain.html.in: document emulator/vcpu pin delay

Daniel Henrique Barboza posted 1 patch 4 years, 1 month ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20200409194517.292036-1-danielhb413@gmail.com
docs/formatdomain.html.in | 7 +++++++
1 file changed, 7 insertions(+)
[PATCH] formatdomain.html.in: document emulator/vcpu pin delay
Posted by Daniel Henrique Barboza 4 years, 1 month ago
In a guest with only one vcpu, when pinning the emulator in say CPU184
and the vcpu0 in CPU0 of the host, the user might expect that only
CPU0 and CPU184 of the host will be used by the guest.

The reality is that Libvirt takes some time to honor the emulator
and vcpu pinning, taking care of NUMA constraints first. This will
result in other CPUs of the host being potentially used by the
QEMU thread until the emulator/vcpu pinning is done. The user
then might be confused by the output of 'virsh cpu-stats' in this
scenario, showing around 200 microseconds of cycles being spent
in other CPUs.

Let's document this behavior, which is explained in detail in
Libvirt commit v5.0.0-199-gf136b83139, in the cputune section
of formatdomain.html.in.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
 docs/formatdomain.html.in | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 47e10a836c..932bf8841f 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -808,6 +808,13 @@
       <dd>
          The optional <code>cputune</code> element provides details
          regarding the CPU tunable parameters for the domain.
+
+         Note: for the qemu driver, the optional <code>vcpupin</code>
+         and <code>emulatorpin</code> pinning settings are honored after
+         the emulator is launched and NUMA constraints considered. This
+         means that it is expected that other physical CPUs of the host
+         will be used during this time by the domain, which will be
+         reflected by the output of <code>virsh cpu-stats</code>.
          <span class="since">Since 0.9.0</span>
       </dd>
       <dt><code>vcpupin</code></dt>
-- 
2.25.1


Re: [PATCH] formatdomain.html.in: document emulator/vcpu pin delay
Posted by Andrea Bolognani 4 years, 1 month ago
On Thu, 2020-04-09 at 16:45 -0300, Daniel Henrique Barboza wrote:
> In a guest with only one vcpu, when pinning the emulator in say CPU184
> and the vcpu0 in CPU0 of the host, the user might expect that only
> CPU0 and CPU184 of the host will be used by the guest.
> 
> The reality is that Libvirt takes some time to honor the emulator
> and vcpu pinning, taking care of NUMA constraints first. This will
> result in other CPUs of the host being potentially used by the
> QEMU thread until the emulator/vcpu pinning is done. The user
> then might be confused by the output of 'virsh cpu-stats' in this
> scenario, showing around 200 microseconds of cycles being spent
> in other CPUs.
> 
> Let's document this behavior, which is explained in detail in
> Libvirt commit v5.0.0-199-gf136b83139, in the cputune section
> of formatdomain.html.in.
> 
> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
> ---
>  docs/formatdomain.html.in | 7 +++++++
>  1 file changed, 7 insertions(+)

  Reviewed-by: Andrea Bolognani <abologna@redhat.com>

and pushed.

-- 
Andrea Bolognani / Red Hat / Virtualization