From: Jérôme Poulin Date: Fri, 22 Aug 2025 03:54:17 +0000 (-0400) Subject: zramctl: fix MEM-USED column description X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=616c88fb9565017c1a08c8869d2559b8d218c443;p=thirdparty%2Futil-linux.git zramctl: fix MEM-USED column description 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. --- diff --git a/po/fr.po b/po/fr.po index 0c328ea15..1b4bfda46 100644 --- 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" diff --git a/po/util-linux.pot b/po/util-linux.pot index dd823e0cd..dcced3c93 100644 --- a/po/util-linux.pot +++ b/po/util-linux.pot @@ -23086,7 +23086,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 diff --git a/sys-utils/zramctl.c b/sys-utils/zramctl.c index e9eea4d1e..d5bdc2a96 100644 --- a/sys-utils/zramctl.c +++ b/sys-utils/zramctl.c @@ -89,7 +89,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") },