From: Peter Krempa <pkrempa(a)redhat.com>
Use the short unit for kibibytes instead of the confusing or plainly
wrong units.
Closes:
https://gitlab.com/libvirt/libvirt/-/issues/594
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
docs/formatdomain.rst | 4 ++--
docs/formatnetwork.rst | 4 ++--
docs/manpages/virsh.rst | 6 +++---
include/libvirt/libvirt-domain.h | 12 ++++++------
src/libvirt-domain.c | 12 ++++++------
5 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
index 8753ee9c23..82606ef35f 100644
--- a/docs/formatdomain.rst
+++ b/docs/formatdomain.rst
@@ -1139,7 +1139,7 @@ influence how virtual memory pages are backed by host pages.
element is introduced. It has one compulsory attribute ``size`` which
specifies which hugepages should be used (especially useful on systems
supporting hugepages of different sizes). The default unit for the ``size``
- attribute is kilobytes (multiplier of 1024). If you want to use different
+ attribute is kiB (multiplier of 1024). If you want to use different
unit, use optional ``unit`` attribute. For systems with NUMA, the optional
``nodeset`` attribute may come handy as it ties given guest's NUMA nodes to
certain hugepage sizes. From the example snippet, one gigabyte hugepages are
@@ -4298,7 +4298,7 @@ attribute are
- ``pcie-to-pci-bridge`` ( :since:`since 4.3.0` )
The root controllers (``pci-root`` and ``pcie-root``) have an optional
-``pcihole64`` element specifying how big (in kilobytes, or in the unit specified
+``pcihole64`` element specifying how big (in kiB, or in the unit specified
by ``pcihole64``'s ``unit`` attribute) the 64-bit PCI hole should be. Some
guests (like Windows XP or Windows Server 2003) might crash when QEMU and
Seabios are recent enough to support 64-bit PCI holes, unless this is disabled
diff --git a/docs/formatnetwork.rst b/docs/formatnetwork.rst
index 053fe6ad56..6694a145af 100644
--- a/docs/formatnetwork.rst
+++ b/docs/formatnetwork.rst
@@ -468,10 +468,10 @@ follows, where accepted values for each attribute is an integer
number.
``average``
Specifies the desired average bit rate for the interface being shaped (in
- kilobytes/second).
+ kiB/second).
``peak``
Optional attribute which specifies the maximum rate at which the bridge can
- send data (in kilobytes/second). Note the limitation of implementation: this
+ send data (in kiB/second). Note the limitation of implementation: this
attribute in the ``outbound`` element is ignored (as Linux ingress filters
don't know it yet).
``burst``
diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst
index 3a00778467..895a905b08 100644
--- a/docs/manpages/virsh.rst
+++ b/docs/manpages/virsh.rst
@@ -2274,7 +2274,7 @@ If no *--inbound* or *--outbound* is specified, this command will
query and show the bandwidth settings. Otherwise, it will set the
inbound or outbound bandwidth. *average,peak,burst,floor* is the same as
in command *attach-interface*. Values for *average*, *peak* and *floor*
-are expressed in kilobytes per second, while *burst* is expressed in kilobytes
+are expressed in kiB per second, while *burst* is expressed in kiB
in a single burst at *peak* speed as described in the Network XML
documentation at
`https://libvirt.org/formatnetwork.html#quality-of-service
<
https://libvirt.org/formatnetwork.html#quality-of-service>`__.
@@ -5261,8 +5261,8 @@ interface. At least one from the *average*, *floor* pair must be
specified. The other two *peak* and *burst* are optional, so
"average,peak", "average,,burst", "average,,,floor",
"average" and
",,,floor" are also legal. Values for *average*, *floor* and *peak*
-are expressed in kilobytes per second, while *burst* is expressed in
-kilobytes in a single burst at *peak* speed as described in the
+are expressed in kiB per second, while *burst* is expressed in
+kiB in a single burst at *peak* speed as described in the
Network XML documentation at
`https://libvirt.org/formatnetwork.html#quality-of-service
<
https://libvirt.org/formatnetwork.html#quality-of-service>`__.
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index 9496631bcc..ac5daf7d0c 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -715,9 +715,9 @@ typedef virDomainInterfaceStatsStruct *virDomainInterfaceStatsPtr;
* Since: 0.7.5
*/
typedef enum {
- /* The total amount of data read from swap space (in kB). (Since: 0.7.5) */
+ /* The total amount of data read from swap space (in kiB). (Since: 0.7.5) */
VIR_DOMAIN_MEMORY_STAT_SWAP_IN = 0,
- /* The total amount of memory written out to swap space (in kB). (Since: 0.7.5) */
+ /* The total amount of memory written out to swap space (in kiB). (Since: 0.7.5) */
VIR_DOMAIN_MEMORY_STAT_SWAP_OUT = 1,
/*
@@ -738,7 +738,7 @@ typedef enum {
/*
* The amount of memory left completely unused by the system. Memory that
* is available but used for reclaimable caches should NOT be reported as
- * free. This value is expressed in kB.
+ * free. This value is expressed in kiB.
*
* Since: 0.7.5
*/
@@ -748,7 +748,7 @@ typedef enum {
* The total amount of usable memory as seen by the domain. This value
* may be less than the amount of memory assigned to the domain if a
* balloon driver is in use or if the guest OS does not initialize all
- * assigned pages. This value is expressed in kB.
+ * assigned pages. This value is expressed in kiB.
*
* Since: 0.7.5
*/
@@ -762,7 +762,7 @@ typedef enum {
VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON = 6,
/* Resident Set Size of the process running the domain. This value
- * is in kB
+ * is in kiB
*
* Since: 0.9.10
*/
@@ -785,7 +785,7 @@ typedef enum {
/*
* The amount of memory, that can be quickly reclaimed without
- * additional I/O (in kB). Typically these pages are used for caching files
+ * additional I/O (in kiB). Typically these pages are used for caching files
* from disk.
*
* Since: 4.6.0
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index 93e8f5b853..ca110bdf85 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -6284,27 +6284,27 @@ virDomainGetInterfaceParameters(virDomainPtr domain,
* Memory Statistics:
*
* VIR_DOMAIN_MEMORY_STAT_SWAP_IN:
- * The total amount of data read from swap space (in kb).
+ * The total amount of data read from swap space (in kiB).
* VIR_DOMAIN_MEMORY_STAT_SWAP_OUT:
- * The total amount of memory written out to swap space (in kb).
+ * The total amount of memory written out to swap space (in kiB).
* VIR_DOMAIN_MEMORY_STAT_MAJOR_FAULT:
* The number of page faults that required disk IO to service.
* VIR_DOMAIN_MEMORY_STAT_MINOR_FAULT:
* The number of page faults serviced without disk IO.
* VIR_DOMAIN_MEMORY_STAT_UNUSED:
- * The amount of memory which is not being used for any purpose (in kb).
+ * The amount of memory which is not being used for any purpose (in kiB).
* VIR_DOMAIN_MEMORY_STAT_AVAILABLE:
- * The total amount of memory available to the domain's OS (in kb).
+ * The total amount of memory available to the domain's OS (in kiB).
* VIR_DOMAIN_MEMORY_STAT_USABLE:
* How much the balloon can be inflated without pushing the guest system
* to swap, corresponds to 'Available' in /proc/meminfo
* VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON:
- * Current balloon value (in kb).
+ * Current balloon value (in kiB).
* VIR_DOMAIN_MEMORY_STAT_LAST_UPDATE
* Timestamp of the last statistic
* VIR_DOMAIN_MEMORY_STAT_DISK_CACHES
* Memory that can be reclaimed without additional I/O, typically disk
- * caches (in kb).
+ * caches (in kiB).
* VIR_DOMAIN_MEMORY_STAT_HUGETLB_PGALLOC
* The number of successful huge page allocations from inside the domain
* VIR_DOMAIN_MEMORY_STAT_HUGETLB_PGFAIL
--
2.49.0