]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lscpu: add note about cache IDs
authorKarel Zak <kzak@redhat.com>
Tue, 3 Nov 2020 09:39:04 +0000 (10:39 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 13 Nov 2020 08:19:02 +0000 (09:19 +0100)
We read the ID from /sys/devices/system/cpu/cpu*/cache/index*/id.

Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/lscpu.1
sys-utils/lscpu.c

index 1ee17a01a54925e81576363bb69be66df5cbed0c..ed14dc6630ec8d07d79f9eccb352580b4eb2a4ab 100644 (file)
@@ -39,7 +39,8 @@ specified, \fBlscpu\fP prints the column but does not provide any data for it.
 The cache sizes are reported as summary from all CPUs.  The versions before
 v2.34 reported per-core sizes, but this output was confusing due to complicated
 CPUs topology and the way how caches are shared between CPUs. For more details
-about caches see \fB\-\-cache\fP.
+about caches see \fB\-\-cache\fP.  Since version v2.37 \fBlscpu\fP follows
+cache IDs as provided by Linux kernel and it does not always start from zero.
 .SS COLUMNS
 Note that topology elements (core, socket, etc.) use a sequential unique ID
 starting from zero, but CPU logical numbers follow the kernel where there is
index 5fdcec7c83ffd4f4795f4054bbbb473f7d523255..ea374fd59bebc461c8af3d0c23eb8654f02a4cb7 100644 (file)
@@ -628,7 +628,7 @@ static void print_cpus_parsable(struct lscpu_cxt *cxt, int cols[], size_t ncols)
        printf(_(
        "# The following is the parsable format, which can be fed to other\n"
        "# programs. Each different item in every column has an unique ID\n"
-       "# starting from zero.\n"));
+       "# starting usually from zero.\n"));
 
        fputs("# ", stdout);
        for (i = 0; i < ncols; i++) {