[PATCH 0/5] lscpu: new --physical option and small improvements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Karel,

another couple of lscpu patches from me. The first patch adds a option
"--physical" which makes lscpu read the core ids, socket ids,
etc. from the corresponding sysfs files, instead of calculating them
on its own.

At least an s390 this is useful to tell on which physical CPUs a
logical partition is running. A subsequent patch adds a new "lscpu -p
-y" testcase so we have at least some test coverage for the parsable
output for this new option.

Please note that the short option of "--physical" is "-y". If you are
not happy with that one feel free to change it; I couldn't decide
which character would make most sense and there isn't any existing
tool with a similar option. So...

Then there are two minor improvement patches.

The last patch adds proper detection of "Thread(s) per core" on
s390. It reads a new field "max thread id" from /proc/cpuinfo which
was just merged into the upstream kernel sources. With this new field
the "Thread(s) per core" line in the summary output now always
reflects the number of hardware threads available, independent of the
number of online CPUs.

Please consider merging these changes.

Thanks,
Heiko

Heiko Carstens (5):
  lscpu: add --physical option
  lscpu: add parsable testcase with the --physical option
  lscpu: only try to read sysfs attributes of present CPUs
  lspcu: minor manpage improvement
  lscpu: print correct number of threads per core if possible

 sys-utils/lscpu.1                             |  16 +++-
 sys-utils/lscpu.c                             | 128 +++++++++++++++++++++-----
 tests/expected/lscpu/lscpu-armv7              |   7 ++
 tests/expected/lscpu/lscpu-ppc-qemu           |   6 ++
 tests/expected/lscpu/lscpu-ppc64-POWER7       |  21 +++++
 tests/expected/lscpu/lscpu-ppc64-POWER7-64cpu |  69 ++++++++++++++
 tests/expected/lscpu/lscpu-s390-kvm           |   8 ++
 tests/expected/lscpu/lscpu-s390-lpar          |  22 +++++
 tests/expected/lscpu/lscpu-s390-lpar-drawer   |  13 +++
 tests/expected/lscpu/lscpu-s390-zvm           |   9 ++
 tests/expected/lscpu/lscpu-sparc64            |  11 +++
 tests/expected/lscpu/lscpu-vbox-win           |   7 ++
 tests/expected/lscpu/lscpu-x86_64-64cpu       |  69 ++++++++++++++
 tests/expected/lscpu/lscpu-x86_64-dell_e4310  |   9 ++
 tests/ts/lscpu/lscpu                          |   5 +
 15 files changed, 375 insertions(+), 25 deletions(-)

-- 
2.6.6

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux