735c6b
From 31f2edcd7f42cda4173eabad879bfc318c202c9e Mon Sep 17 00:00:00 2001
735c6b
Message-Id: <31f2edcd7f42cda4173eabad879bfc318c202c9e@dist-git>
735c6b
From: Pavel Hrdina <phrdina@redhat.com>
735c6b
Date: Tue, 17 Jan 2023 10:33:22 +0100
735c6b
Subject: [PATCH] docs: document correct cpu shares limits with both cgroups v1
735c6b
 and v2
735c6b
735c6b
The limits are different with cgroups v1 and v2 but our XML
735c6b
documentation and virsh manpage mentioned only cgroups v1 limits without
735c6b
explicitly saying it only applies to cgroups v1.
735c6b
735c6b
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
735c6b
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
735c6b
(cherry picked from commit ead6e1b00285cbd98e0f0727efb8adcb29ebc1ba)
735c6b
735c6b
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2037998
735c6b
735c6b
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
735c6b
---
735c6b
 docs/formatdomain.rst   | 2 +-
735c6b
 docs/manpages/virsh.rst | 3 ++-
735c6b
 2 files changed, 3 insertions(+), 2 deletions(-)
735c6b
735c6b
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
735c6b
index 490a954745..8fc8aeb928 100644
735c6b
--- a/docs/formatdomain.rst
735c6b
+++ b/docs/formatdomain.rst
735c6b
@@ -849,7 +849,7 @@ CPU Tuning
735c6b
    There is no unit for the value, it's a relative measure based on the setting
735c6b
    of other VM, e.g. A VM configured with value 2048 will get twice as much CPU
735c6b
    time as a VM configured with value 1024. The value should be in range
735c6b
-   [2, 262144]. :since:`Since 0.9.0`
735c6b
+   [2, 262144] using cgroups v1, [1, 10000] using cgroups v2. :since:`Since 0.9.0`
735c6b
 ``period``
735c6b
    The optional ``period`` element specifies the enforcement interval (unit:
735c6b
    microseconds). Within ``period``, each vCPU of the domain will not be allowed
735c6b
diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst
735c6b
index 88b7fa1da8..d5b614dc03 100644
735c6b
--- a/docs/manpages/virsh.rst
735c6b
+++ b/docs/manpages/virsh.rst
735c6b
@@ -4054,7 +4054,8 @@ If *--config* is specified, affect the next start of a persistent guest.
735c6b
 If *--current* is specified, it is equivalent to either *--live* or
735c6b
 *--config*, depending on the current state of the guest.
735c6b
 
735c6b
-``Note``: The cpu_shares parameter has a valid value range of 2-262144.
735c6b
+``Note``: The cpu_shares parameter has a valid value range of 2-262144
735c6b
+with cgroups v1, 1-10000 with cgroups v2.
735c6b
 
735c6b
 ``Note``: The weight and cap parameters are defined only for the
735c6b
 XEN_CREDIT scheduler.
735c6b
-- 
735c6b
2.39.1
735c6b