From: Karel Zak Date: Tue, 3 Nov 2020 09:39:04 +0000 (+0100) Subject: lscpu: add note about cache IDs X-Git-Tag: v2.37-rc1~303 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6321d34f0f929d640a8fff26a911c7db077dfe24;p=thirdparty%2Futil-linux.git lscpu: add note about cache IDs We read the ID from /sys/devices/system/cpu/cpu*/cache/index*/id. Signed-off-by: Karel Zak --- diff --git a/sys-utils/lscpu.1 b/sys-utils/lscpu.1 index 1ee17a01a5..ed14dc6630 100644 --- a/sys-utils/lscpu.1 +++ b/sys-utils/lscpu.1 @@ -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 diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c index 5fdcec7c83..ea374fd59b 100644 --- a/sys-utils/lscpu.c +++ b/sys-utils/lscpu.c @@ -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++) {