From nobody Tue Sep 9 19:11:28 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1748854789; cv=none; d=zohomail.com; s=zohoarc; b=C1UESNp0+2e55XSlTQ7xWTWEkPF8cltvScYNtGYfYBAQ7qo3XWObS2ZKOTN5wXLdKXsSSRZsYXl+sF33Duum9sl7SWHQxAHQDqVEYOfQKBoeu2ywGKg/GgBvXEHqJR9qjZjCmKBfykzPqHLHP2tI1Tob3M38e9UZMSE3Jdyth/o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748854789; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:Subject:Subject:To:To:Message-Id:Cc; bh=U9SDu6jrzYdY2fxIgupvDQhIohQNa0N54UOrncHKfqM=; b=dt9ZZ/BefA5aQzkdl3eWXuJ6y9ZE3kaA3qaQkJrBaDNb01v8BlBWRS/v4jcTM2mjCAiLQcZCY9x80MIoMKC1M5hk8eFvxa4IBp80OF/4z1iqGoxrSUmSoR5JDTHvYbadCjQHofr9GFz4+SB4TsXNdzL4bf9uwiCet55h/Qr5UZU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1748854789090386.8580883052516; Mon, 2 Jun 2025 01:59:49 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id E50A61311; Mon, 2 Jun 2025 04:59:47 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id D8AF61272; Mon, 2 Jun 2025 04:59:12 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 9459E110F; Mon, 2 Jun 2025 04:59:08 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id CACAE126C for ; Mon, 2 Jun 2025 04:59:07 -0400 (EDT) Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-90-PacbAJNBPgulVzojprHfCw-1; Mon, 02 Jun 2025 04:59:06 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3BD6719560AA for ; Mon, 2 Jun 2025 08:59:05 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.44.22.3]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 76184180049D for ; Mon, 2 Jun 2025 08:59:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748854747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pbug1rapExql+JXWvsiYZM5ZB7z+0h936jty5bA/DW0=; b=N6oFTpRCuD9xaFUxB8XurRCK0+eaBBirKMALTxfWi83zSAa38DoYq9Y6ZbOGNJdG/SqfYN nLMnYvfI6OcPTb5MsKHazrM6dnnLV2luuHItUCL01cKN5XpOY01/xJOVlWqD7kx3Jr+qm/ QGKpr2ofeTm5n9dHU+e9b5GCi4UwLoo= X-MC-Unique: PacbAJNBPgulVzojprHfCw-1 X-Mimecast-MFC-AGG-ID: PacbAJNBPgulVzojprHfCw_1748854745 To: devel@lists.libvirt.org Subject: [PATCH] docs: Change units to 'kiB' from 'kB'/'kilobytes'/'kb' Date: Mon, 2 Jun 2025 10:59:02 +0200 Message-ID: <9ba867228c5c9f44bea9f518739d9f91324d7963.1748854742.git.pkrempa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: RnaNaik8JIgm9qYs3u_fNfUUBQoUtXRT2GjIr_mcTZw_1748854745 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: DJGAGQTW5SALAONDR4UVPZZCD4KAUBIQ X-Message-ID-Hash: DJGAGQTW5SALAONDR4UVPZZCD4KAUBIQ X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1748854791397116600 Content-Type: text/plain; charset="utf-8" From: Peter Krempa 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 Reviewed-by: Pavel Hrdina --- 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 ``si= ze`` - attribute is kilobytes (multiplier of 1024). If you want to use differe= nt + attribute is kiB (multiplier of 1024). If you want to use different unit, use optional ``unit`` attribute. For systems with NUMA, the optio= nal ``nodeset`` attribute may come handy as it ties given guest's NUMA node= s to certain hugepage sizes. From the example snippet, one gigabyte hugepage= s 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 spe= cified +``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 disa= bled 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 filt= ers 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 kilob= ytes +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 `__. @@ -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 `__. diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-dom= ain.h index 9496631bcc..ac5daf7d0c 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -715,9 +715,9 @@ typedef virDomainInterfaceStatsStruct *virDomainInterfa= ceStatsPtr; * 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 =3D 0, - /* The total amount of memory written out to swap space (in kB). (Sinc= e: 0.7.5) */ + /* The total amount of memory written out to swap space (in kiB). (Sin= ce: 0.7.5) */ VIR_DOMAIN_MEMORY_STAT_SWAP_OUT =3D 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 =3D 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 ki= B). * 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 syst= em * 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 doma= in * VIR_DOMAIN_MEMORY_STAT_HUGETLB_PGFAIL --=20 2.49.0