Sami Kerola [Tue, 1 Sep 2020 19:23:36 +0000 (20:23 +0100)]
cifuzz: reindent yaml file
Fixex two yamllint indentation warning, the truthy is false positive.
util-linux $ yamllint ./.github/workflows/cifuzz.yml
6:1 warning truthy value should be one of [false, true] (truthy)
14:2 error wrong indentation: expected 2 but found 1 (indentation)
22:4 error wrong indentation: expected 5 but found 3 (indentation)
Reference: https://github.com/adrienverge/yamllint Signed-off-by: Sami Kerola <kerolasa@iki.fi>
That's because 367c85c47 changes to get the modelname from Processor
Version of SMBIOS.
To fix that, use the hard corded table to show the "Model name" and
add two new lines; "BIOS Vendor ID" and "BIOS Model name" to show the
SMBIOS information.
lscpu shows the SMBIOS information when root user runs it because
accessing the SMBIOS information requires root privilege.
[kzak@redhat.com: - port the patch to new lscpu code]
Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 3 Nov 2020 10:49:28 +0000 (11:49 +0100)]
lscpu: update tests
* cpu MHz is per-CPU value and not printed in summary anymore
* topology is reordered
* number of NUMA nodes is moved to NUMA section
* parsable output uses cache ID from kernel if avalable
Karel Zak [Tue, 3 Nov 2020 10:13:26 +0000 (11:13 +0100)]
lscpu: improve bogomips use
* keep global (cputype) bogomips
* add per-CPU bogomips
* use bogomips from the first CPU as global (for cputype) if /proc/cpuinfo does not provide global bogomips
* add BOGOMIPS column for to -e/-p output
Karel Zak [Tue, 3 Nov 2020 08:46:45 +0000 (09:46 +0100)]
lscpu: improve topology calculation
Let's make it more robust and readable. The sysinfo file on s390 may
contain zeros, so we need to check the values and fallback to data
from shared maps if necessary.
Karel Zak [Mon, 2 Nov 2020 09:11:46 +0000 (10:11 +0100)]
lscpu: generate cache ID if not available
The file /sys/devices/system/cpu/cpu*/cache/index*/id is not available
in old kernels. This patch add code to generate IDs according to cache
type and level.
Karel Zak [Fri, 4 Sep 2020 09:27:33 +0000 (11:27 +0200)]
lscpu: keep static/dynamic MHz in cputype struct
The Dynamic and Static MHz are /proc/cpuinfo s390 per-CPU fields, but
we display it as a single value according the first parsed CPU. For
this purpose we store the values from the first CPU in lscpu_cputype.
For -p and -e outputs we will print per CPU values.
Karel Zak [Thu, 20 Aug 2020 10:28:52 +0000 (12:28 +0200)]
lscpu: use cache ID, keep caches independent on CPU type
The cache is identified by Type, Level and ID, the ID is unique cache
instance identifier (of the type).
This changes forces lscpu allocate more lscpu_cache instances (than
old version), but now we're ready for arbitrary scenario where
different CPU types share caches and the same cache type uses
different size in different instances, etc.
Karel Zak [Wed, 19 Aug 2020 10:43:48 +0000 (12:43 +0200)]
lscpu: remove obsolete code
This is the first step in conversion from old lscpu to the new code.
The patch removes obsolete code from lscpu.c and lscpu.h. The old
output code in lscpu.c is temporary disabled by #ifdef due to
incompatibility between old and new internal APIs -- this will be
changed later by small steps to make all all the changes review-able.
Karel Zak [Thu, 16 Jul 2020 08:51:14 +0000 (10:51 +0200)]
lscpu: calculate threads number from type specific values
Don't use global CPU masks (like "online" or "present") to
calculate type specific number of threads due systems with
mixed CPU types.
It's also necessary to check all thread_siblings maps to get the
highest number, because some threads (CPUs) may be disables, for
example old lscpu calculates number of threads from the cpu0 and
if you disable cpu0's sibling (cpu4):
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 2 <---
Core(s) per socket: 4
Socket(s): 1
Karel Zak [Tue, 17 Mar 2020 12:12:12 +0000 (13:12 +0100)]
lscpu: add very basic cputype code
The current lscpu assumes that all CPUs in the system are the same.
Unfortunately this is not true. We need to split all internal CPUs
descriptions to CPU-type and CPU.
This patch add lscpu-cputype.c where will be CPU-type description --
mostly based on /proc/cpuinfo.
Pali Rohár [Thu, 5 Nov 2020 18:23:23 +0000 (19:23 +0100)]
libblkid: udf: add support for multisession via session_offset hint
To read multisession UDF disc it is required to probe VSD and AVDP from the
selected session (specified by session_offset) and then read other volume
descriptors from absolute location specified in AVDP, which is in most
cases in previous session.
So it is required for udf detector to be able to read data from any
location of disc and therefore blkid's --offset argument cannot be used to
access multisession optical disc.
Only blkid's --hint session_offset argument can be used to instruct blkid
to read multisession optical disc or disc images correctly.
Pali Rohár [Thu, 5 Nov 2020 18:22:58 +0000 (19:22 +0100)]
libblkid: iso9660: add support for multisession via session_offset hint
The only required change is to read disc from offset specified by
session_offset instead of beginning of disc (offset 0).
So either blkid's --offset or --hint session_offset argument would work for
correct detection of multisession ISO9660 optical disc or disc image.
Although the ISO9660 specification allows also non-2kB sector sizes,
current blkid implementation has hardcoded ISO9660 sector size to 2kB.
Therefore there is check that session_offset is multiple of 2048.