Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU cores count on Linux/HPPA is not detected correctly #1645

Closed
DerDakon opened this issue Dec 18, 2019 · 2 comments
Closed

CPU cores count on Linux/HPPA is not detected correctly #1645

DerDakon opened this issue Dec 18, 2019 · 2 comments

Comments

@DerDakon
Copy link

Platform

  • Gentoo Linux on HP C8000
  • 5.6.7

Bug description
My HP C8000 has 4 CPUs, 2 sockets with a dual-die processor module in them. PA-RISC has no hyperthreading.

FAIL: psutil.tests.test_linux.TestSystemCPUCountPhysical.test_against_lscpu
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/tests/test_linux.py", line 693, in test_against_lscpu
    self.assertEqual(psutil.cpu_count(logical=False), len(core_ids))
AssertionError: 2 != 4
chroot ~ # lscpu
Architecture:        parisc64
Byte Order:          Big Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  1
Core(s) per socket:  2
Socket(s):           2
CPU family:          PA-RISC 2.0
Model:               9000/785/C8000
Model name:          PA8800 (Mako)
CPU MHz:             1000.000000
BogoMIPS:            1988.60
chroot ~ # lscpu -p
# The following is the parsable format, which can be fed to other
# programs. Each different item in every column has an unique ID
# starting from zero.
# CPU,Core,Socket,Node
0,0,0,
1,1,0,
2,2,1,
3,3,1,
chroot ~ # cat /proc/cpuinfo 
processor       : 0
cpu family      : PA-RISC 2.0
cpu             : PA8800 (Mako)
cpu MHz         : 1000.000000
physical id     : 0
siblings        : 2
core id         : 0
capabilities    : os64 iopdir_fdc needs_equivalent_aliasing (0x35)
model           : 9000/785/C8000
model name      : Crestone Peak Fast?
hversion        : 0x000088b0
sversion        : 0x00000491
I-cache         : 32768 KB
D-cache         : 32768 KB (WB, direct mapped)
ITLB entries    : 240
DTLB entries    : 240 - shared with ITLB
bogomips        : 1988.60
software id     : 6266852346624179925

processor       : 1
cpu family      : PA-RISC 2.0
cpu             : PA8800 (Mako)
cpu MHz         : 1000.000000
physical id     : 0
siblings        : 2
core id         : 1
capabilities    : os64 iopdir_fdc needs_equivalent_aliasing (0x35)
model           : 9000/785/C8000
model name      : Crestone Peak Fast?
hversion        : 0x000088b0
sversion        : 0x00000491
I-cache         : 32768 KB
D-cache         : 32768 KB (WB, direct mapped)
ITLB entries    : 240
DTLB entries    : 240 - shared with ITLB
bogomips        : 1988.60
software id     : 6266852346624179925

processor       : 2
cpu family      : PA-RISC 2.0
cpu             : PA8800 (Mako)
cpu MHz         : 1000.000000
physical id     : 1
siblings        : 2
core id         : 0
capabilities    : os64 iopdir_fdc needs_equivalent_aliasing (0x35)
model           : 9000/785/C8000
model name      : Crestone Peak Fast?
hversion        : 0x000088b0
sversion        : 0x00000491
I-cache         : 32768 KB
D-cache         : 32768 KB (WB, direct mapped)
ITLB entries    : 240
DTLB entries    : 240 - shared with ITLB
bogomips        : 1988.60
software id     : 6266852346624179925

processor       : 3
cpu family      : PA-RISC 2.0
cpu             : PA8800 (Mako)
cpu MHz         : 1000.000000
physical id     : 1
siblings        : 2
core id         : 1
capabilities    : os64 iopdir_fdc needs_equivalent_aliasing (0x35)
model           : 9000/785/C8000
model name      : Crestone Peak Fast?
hversion        : 0x000088b0
sversion        : 0x00000491
I-cache         : 32768 KB
D-cache         : 32768 KB (WB, direct mapped)
ITLB entries    : 240
DTLB entries    : 240 - shared with ITLB
bogomips        : 1988.60
software id     : 6266852346624179925

@DerDakon
Copy link
Author

As I now found out this is also wrong on my T5120:

FAIL: psutil.tests.test_linux.TestSystemCPUCountPhysical.test_against_lscpu
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/psutil-5.7.2/work/psutil-5.7.2/psutil/tests/test_linux.py", line 695, in test_against_lscpu
    self.assertEqual(psutil.cpu_count(logical=False), len(core_ids))
AssertionError: 8 != 16
castor ~ #  lscpu
Architecture:        sparc64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Big Endian
CPU(s):              64
On-line CPU(s) list: 0-63
Thread(s) per core:  4
Core(s) per socket:  16
Socket(s):           1
NUMA node(s):        1
Model name:          UltraSparc T2 (Niagara2)
NUMA node0 CPU(s):   0-63
Flags:               sun4v
castor ~ #  lscpu -p
# The following is the parsable format, which can be fed to other
# programs. Each different item in every column has an unique ID
# starting from zero.
# CPU,Core,Socket,Node
0,0,0,0
1,0,0,0
2,0,0,0
3,0,0,0
4,1,0,0
5,1,0,0
6,1,0,0
7,1,0,0
8,2,0,0
9,2,0,0
10,2,0,0
11,2,0,0
12,3,0,0
13,3,0,0
14,3,0,0
15,3,0,0
16,4,0,0
17,4,0,0
18,4,0,0
19,4,0,0
20,5,0,0
21,5,0,0
22,5,0,0
23,5,0,0
24,6,0,0
25,6,0,0
26,6,0,0
27,6,0,0
28,7,0,0
29,7,0,0
30,7,0,0
31,7,0,0
32,8,0,0
33,8,0,0
34,8,0,0
35,8,0,0
36,9,0,0
37,9,0,0
38,9,0,0
39,9,0,0
40,10,0,0
41,10,0,0
42,10,0,0
43,10,0,0
44,11,0,0
45,11,0,0
46,11,0,0
47,11,0,0
48,12,0,0
49,12,0,0
50,12,0,0
51,12,0,0
52,13,0,0
53,13,0,0
54,13,0,0
55,13,0,0
56,14,0,0
57,14,0,0
58,14,0,0
59,14,0,0
60,15,0,0
61,15,0,0
62,15,0,0
63,15,0,0

@giampaolo giampaolo changed the title CPU count on Linux/HPPA is not detected correctly CPU cores count on Linux/HPPA is not detected correctly Dec 29, 2020
@giampaolo
Copy link
Owner

I think this was fixed by #1727. If not please comment. Closing as duplicate for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants