diff options
| author | Jérôme Poulin <jeromepoulin@gmail.com> | 2025-08-21 23:54:17 -0400 |
|---|---|---|
| committer | Jérôme Poulin <jeromepoulin@gmail.com> | 2025-08-22 00:09:18 -0400 |
| commit | 616c88fb9565017c1a08c8869d2559b8d218c443 (patch) | |
| tree | 3c78a7bdf2f74b86565e95b6b8e3e5a97955f480 /sys-utils | |
| parent | c5d76cba5832ddb865819fb5aa6b1280e64133ee (diff) | |
| download | util-linux-616c88fb9565017c1a08c8869d2559b8d218c443.tar.gz | |
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.
Diffstat (limited to 'sys-utils')
| -rw-r--r-- | sys-utils/zramctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys-utils/zramctl.c b/sys-utils/zramctl.c index e9eea4d1e2..d5bdc2a963 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") }, |
