]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
zramctl: fix MEM-USED column description
authorJérôme Poulin <jeromepoulin@gmail.com>
Fri, 22 Aug 2025 03:54:17 +0000 (23:54 -0400)
committerKarel Zak <kzak@redhat.com>
Tue, 9 Sep 2025 10:10:28 +0000 (12:10 +0200)
The MEM-USED column was incorrectly documented as showing current
memory consumption. This is due to confusing naming in the kernel's
zram implementation:

- Kernel field "mem_used_total" (3rd in mm_stat) = current memory usage
- Kernel field "mem_used_max" (5th in mm_stat) = peak memory usage

zramctl maps these as:
- TOTAL column <= mem_used_total (current usage)
- MEM-USED column <= mem_used_max (peak usage)

The misleading "MEM-USED" name suggests current usage, but it actually
shows the peak memory usage (high water mark) since device creation
or last reset. This is tracked by the kernel's max_used_pages which
only increases when current usage exceeds the stored maximum.

Fixed description from:
"memory zram have been consumed to store compressed data" to
"peak memory usage to store compressed data".

Mise à jour de la traduction française.

(cherry picked from commit 616c88fb9565017c1a08c8869d2559b8d218c443)

po/fr.po
po/util-linux.pot
sys-utils/zramctl.c

index 0c328ea1528b305993fad76cb86d9fc3d96f74a1..1b4bfda4680a4104fc1c330f9e32eb2b78dffa62 100644 (file)
--- a/po/fr.po
+++ b/po/fr.po
@@ -23366,8 +23366,8 @@ msgid "memory limit used to store compressed data"
 msgstr "Limite de mémoire utilisée pour stocker des données compressées"
 
 #: sys-utils/zramctl.c:85
-msgid "memory zram have been consumed to store compressed data"
-msgstr "la mémoire zRAM a été consommée pour stocker des données compressées"
+msgid "peak memory usage to store compressed data"
+msgstr "pointe d'utilisation mémoire pour stocker les données compressées"
 
 #: sys-utils/zramctl.c:86
 msgid "number of objects migrated by compaction"
index c740b838540127791222756c345b84621b7459e5..a295f400aa3ae6727400ace62423605859fd47b5 100644 (file)
@@ -23091,7 +23091,7 @@ msgid "memory limit used to store compressed data"
 msgstr ""
 
 #: sys-utils/zramctl.c:85
-msgid "memory zram have been consumed to store compressed data"
+msgid "peak memory usage to store compressed data"
 msgstr ""
 
 #: sys-utils/zramctl.c:86
index 254d2db24526ad5f285412e84502693c4fd51276..a8390efe56c3651c3c80ea48e6d25e91472d478b 100644 (file)
@@ -83,7 +83,7 @@ static const struct colinfo infos[] = {
        [COL_ZEROPAGES] = { "ZERO-PAGES",   3, SCOLS_FL_RIGHT, N_("empty pages with no allocated memory") },
        [COL_MEMTOTAL]  = { "TOTAL",        5, SCOLS_FL_RIGHT, N_("all memory including allocator fragmentation and metadata overhead") },
        [COL_MEMLIMIT]  = { "MEM-LIMIT",    5, SCOLS_FL_RIGHT, N_("memory limit used to store compressed data") },
-       [COL_MEMUSED]   = { "MEM-USED",     5, SCOLS_FL_RIGHT, N_("memory zram have been consumed to store compressed data") },
+       [COL_MEMUSED]   = { "MEM-USED",     5, SCOLS_FL_RIGHT, N_("peak memory usage to store compressed data") },
        [COL_MIGRATED]  = { "MIGRATED",     5, SCOLS_FL_RIGHT, N_("number of objects migrated by compaction") },
        [COL_COMPRATIO] = { "COMP-RATIO",   5, SCOLS_FL_RIGHT, N_("compression ratio: DATA/TOTAL") },
        [COL_MOUNTPOINT]= { "MOUNTPOINT",0.10, SCOLS_FL_TRUNC, N_("where the device is mounted") },