Skip to contentSkip to conversation

SMP is broken on sparc64 with kernel 4.x/5.x

DISCUSSION Wolf Ruediger Spielmann 2 participants 6 messages Oct 9, 2020

lore
Share & tools
lore
#0 lore raw

Hi @all,

I freshly installed linux on my SUN Ultra 60 /w 2x 450MHz CPUs.

First I tested kernel 5.8.x and couldn't get SMP to work on both CPUs - just the first CPU will be activated. Same results with kernel 4.19.146 .
Kernel 3.18.140 runs perfectly on both CPUs.

Might be the problem that the CPUs numbering scheme is not linear:
CPU1 is #0 and CPU2 is #2 (NOT #1)

Below you find some infos.

With kernel 5.8.14 (also tested 5.4.66 and 4.19.146) :

dmesg (cutted)

[    0.000335] Linux version 5.8.14-gentoo (root@compilenode1) (sparc64-unknown-linux-gnu-gcc (Gentoo Hardened 9.3.0-r1 p3) 9.3.0, GNU ld (Gentoo 2.34 p6) 2.34.0) #2 SMP Thu Oct 8 10:40:33 CEST 2020
...
[    0.918138] percpu: Embedded 10 pages/cpu s42648 r8192 d31080 u2097152
[    0.942080] pcpu-alloc: s42648 r8192 d31080 u2097152 alloc=1*4194304
[    0.942090] pcpu-alloc: [0] 0 1 
...
[    1.252126] rcu: Hierarchical RCU implementation.
[    1.268124] rcu:     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2.
[    1.288896] rcu: RCU calculated value of scheduler-enlistment delay is 100 jiffies.
[    1.312586] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    1.334035] NR_IRQS: 2048, nr_irqs: 2048, preallocated irqs: 1
...
[    1.532316] Calibrating delay using timer specific routine.. 905.89 BogoMIPS (lpj=452945)
...
[    1.539394] rcu: Hierarchical SRCU implementation.
[    1.540102] smp: Bringing up secondary CPUs ...
[    1.540120] smp: Brought up 1 node, 1 CPU

########

ultra60-1 ~ # lscpu

Architecture:        sparc64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Big Endian
CPU(s):              1
On-line CPU(s) list: 0
Thread(s) per core:  1
Core(s) per socket:  1
Socket(s):           1
NUMA node(s):        1
Model name:          TI UltraSparc II  (BlackBird)
NUMA node0 CPU(s):   0
Flags:               sun4u

########

ultra60-1 ~ # cat /proc/cpuinfo
cpu : TI UltraSparc II (BlackBird)
fpu : UltraSparc II integrated FPU
pmu : ultra12
prom : OBP 3.31.0 2001/07/25 20:31
type : sun4u
ncpus probed : 2
ncpus active : 1
D$ parity tl1 : 0
I$ parity tl1 : 0
cpucaps : flush,stbar,swap,muldiv,v9,mul32,div32,v8plus,vis
Cpu0ClkTck : 000000001ad38c39
MMU Type : Spitfire
MMU PGSZs : 8K,64K,512K,4MB
State:
CPU0: online

########

ultra60-1 ~ # cat /sys/devices/system/cpu/offline
1
ultra60-1 ~ # cat /sys/devices/system/cpu/online
0

#################################################################

With kernel 3.18.140

dmesg (cutted)

[    0.000000] PROMLIB: Sun IEEE Boot Prom 'OBP 3.31.0 2001/07/25 20:31'
...
[    0.000000] Linux version 3.18.140 (root@compilenode1) (gcc version 9.3.0 (Gentoo Hardened 9.3.0-r1 p3) ) #7 SMP Thu Oct 8 15:37:47 CEST 2020
...
[    0.000000] PERCPU: Embedded 8 pages/cpu @fffff800bf800000 s21760 r8192 d35584 u2097152
[    0.000000] pcpu-alloc: s21760 r8192 d35584 u2097152 alloc=1*4194304
[    0.000000] pcpu-alloc: [0] 0 2 
...
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=3.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=3
[    0.000000] NR_IRQS:2048 nr_irqs:2048 1
...
[   82.644201] CPU 2: synchronized TICK with master CPU (last diff 0 cycles, maxerr 535 cycles)
[   82.644302] Brought up 2 CPUs

########

ultra60-1 ~ # lscpu

Architecture:        sparc64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Big Endian
CPU(s):              2
On-line CPU(s) list: 0,2
Thread(s) per core:  1
Core(s) per socket:  1
Socket(s):           2
NUMA node(s):        1
Model name:          TI UltraSparc II  (BlackBird)
NUMA node0 CPU(s):   0-3
Flags:               sun4u

########

ultra60-1 ~ # cat /proc/cpuinfo
cpu : TI UltraSparc II (BlackBird)
fpu : UltraSparc II integrated FPU
pmu : ultra12
prom : OBP 3.31.0 2001/07/25 20:31
type : sun4u
ncpus probed : 2
ncpus active : 2
D$ parity tl1 : 0
I$ parity tl1 : 0
cpucaps : flush,stbar,swap,muldiv,v9,mul32,div32,v8plus,vis
Cpu0ClkTck : 000000001ad37db2
Cpu2ClkTck : 000000001ad37db2
MMU Type : Spitfire
MMU PGSZs : 8K,64K,512K,4MB
State:
CPU0: online
CPU2: online

########

ultra60-1 ~ # cat /sys/devices/system/cpu/offline

ultra60-1 ~ # cat /sys/devices/system/cpu/online
0,2

best regards,
Rüdiger

#1 lore raw

Hi Wolf!

Quoted 8 lines · Wolf Ruediger Spielmann

I freshly installed linux on my SUN Ultra 60 /w 2x 450MHz CPUs.

First I tested kernel 5.8.x and couldn't get SMP to work on both CPUs - just the first CPU will be activated. Same results with kernel 4.19.146 .
Kernel 3.18.140 runs perfectly on both CPUs.

Might be the problem that the CPUs numbering scheme is not linear:
CPU1 is #0 and CPU2 is #2 (NOT #1)

It mostly affects older machines, the newer machines such as T5220, T5240 and T5 that we have in Debian have no issues with the latest kernel versions.

We do have an UltraSPARC IIIi machine that we need to keep at 4.19 as the machine otherwise becomes unstable.

Adrian

Signature · 4 lines
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [email protected]
`. `'   Freie Universitaet Berlin - [email protected]
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
#2 lore raw
In reply to Wolf Ruediger Spielmann

Hi John

Quoted 5 lines · On Fri, 9 Oct 2020 16:30:35 +0200 John Paul Adrian Glaubitz…

It mostly affects older machines, the newer machines such as T5220, T5240 and T5 that we have in Debian have no issues with the latest kernel versions.

We do have an UltraSPARC IIIi machine that we need to keep at 4.19 as the machine otherwise becomes unstable.

I have absolute no stability issues.
It's (in my opinion) pcpu-alloc:
kernel 4.x/5.x: pcpu-alloc: [0] 0 1
kernel 3.x: pcpu-alloc: [0] 0 2

Is it fixable? Or will it stay in state "broken" ?

Rüdiger

#3 lore raw
In reply to Wolf Ruediger Spielmann

Hello Ruediger!

Quoted 6 lines · Wolf Ruediger Spielmann
Quoted 3 lines · On Fri, 9 Oct 2020 16:30:35 +0200 John Paul Adrian Glaubitz…

It mostly affects older machines, the newer machines such as T5220, T5240 and T5 that we have in Debian have no issues with the latest kernel versions.

Quoted 7 lines
Quoted 2 lines

We do have an UltraSPARC IIIi machine that we need to keep at 4.19 as the machine otherwise becomes unstable.

I have absolute no stability issues.
It's (in my opinion) pcpu-alloc:
kernel 4.x/5.x: pcpu-alloc: [0] 0 1
kernel 3.x: pcpu-alloc: [0] 0 2

Interesting. I have not yet seen this issue on any of our Debian development machines. What distribution are you running? Is this Gentoo?

Our of curiosity, could you give it a go with Debian?

Quoted 3 lines

https://cdimage.debian.org/cdimage/ports/2020-08-19/debian-10.0.0-sparc64-NETINST-1.iso

Is it fixable? Or will it stay in state "broken" ?

Of course, it would be fixed we know what's wrong.

Adrian

Signature · 4 lines
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [email protected]
`. `'   Freie Universitaet Berlin - [email protected]
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
#4 lore raw
In reply to Wolf Ruediger Spielmann

Hi Adrian,

Quoted 9 lines · On Fri, 9 Oct 2020 16:49:32 +0200 John Paul Adrian Glaubitz…
Quoted 3 lines · Wolf Ruediger Spielmann

It's (in my opinion) pcpu-alloc:
kernel 4.x/5.x: pcpu-alloc: [0] 0 1
kernel 3.x: pcpu-alloc: [0] 0 2

Interesting. I have not yet seen this issue on any of our Debian development machines. What distribution are you running? Is this Gentoo?

Our of curiosity, could you give it a go with Debian?

Yes - my distro is gentoo. All of my machines run Gentoo: the SUNs as well as x64 (for crosscompiling). My first shot compiling the kernel native on the SUN took 4 hours and only 5mins crosscompiling on x86 :-D

I'll give debian a try.

Rüdiger

#5 lore raw
In reply to Wolf Ruediger Spielmann

Hi Adrian,

Quoted 10 lines · On Fri, 9 Oct 2020 16:49:32 +0200 John Paul Adrian Glaubitz…
Quoted 3 lines

It's (in my opinion) pcpu-alloc:
kernel 4.x/5.x: pcpu-alloc: [0] 0 1
kernel 3.x: pcpu-alloc: [0] 0 2

Interesting. I have not yet seen this issue on any of our Debian development machines. What distribution are you running? Is this Gentoo?

Our of curiosity, could you give it a go with Debian?

Quoted 1 line

https://cdimage.debian.org/cdimage/ports/2020-08-19/debian-10.0.0-sparc64-NETINST-1.iso

OK - tested this ISO-image:
- boots to bootloader GRUB
- I chose two options ("expert install" and "rescue shell")
- SUN loads and boots kernel, but I never reach installer nor rescue shell Boot-process stalls middle in nowhere and shows me a blinking cursor forever.

Rüdiger