All of lore.kernel.org
 help / color / mirror / Atom feed
* SMP is broken on sparc64 with kernel 4.x/5.x
@ 2020-10-09 14:19 Wolf Ruediger Spielmann
  2020-10-09 14:30 ` John Paul Adrian Glaubitz
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Wolf Ruediger Spielmann @ 2020-10-09 14:19 UTC (permalink / raw)
  To: sparclinux

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SMP is broken on sparc64 with kernel 4.x/5.x
  2020-10-09 14:19 SMP is broken on sparc64 with kernel 4.x/5.x Wolf Ruediger Spielmann
@ 2020-10-09 14:30 ` John Paul Adrian Glaubitz
  2020-10-09 14:40 ` Wolf Ruediger Spielmann
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: John Paul Adrian Glaubitz @ 2020-10-09 14:30 UTC (permalink / raw)
  To: sparclinux

Hi Wolf!

On 10/9/20 4:19 PM, Wolf Ruediger Spielmann wrote:
> 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

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SMP is broken on sparc64 with kernel 4.x/5.x
  2020-10-09 14:19 SMP is broken on sparc64 with kernel 4.x/5.x Wolf Ruediger Spielmann
  2020-10-09 14:30 ` John Paul Adrian Glaubitz
@ 2020-10-09 14:40 ` Wolf Ruediger Spielmann
  2020-10-09 14:49 ` John Paul Adrian Glaubitz
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Wolf Ruediger Spielmann @ 2020-10-09 14:40 UTC (permalink / raw)
  To: sparclinux

Hi John

On Fri, 9 Oct 2020 16:30:35 +0200
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> wrote:

> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SMP is broken on sparc64 with kernel 4.x/5.x
  2020-10-09 14:19 SMP is broken on sparc64 with kernel 4.x/5.x Wolf Ruediger Spielmann
  2020-10-09 14:30 ` John Paul Adrian Glaubitz
  2020-10-09 14:40 ` Wolf Ruediger Spielmann
@ 2020-10-09 14:49 ` John Paul Adrian Glaubitz
  2020-10-09 15:50 ` Wolf Ruediger Spielmann
  2020-10-09 20:46 ` Wolf Ruediger Spielmann
  4 siblings, 0 replies; 6+ messages in thread
From: John Paul Adrian Glaubitz @ 2020-10-09 14:49 UTC (permalink / raw)
  To: sparclinux

Hello Ruediger!

On 10/9/20 4:40 PM, Wolf Ruediger Spielmann wrote:
> On Fri, 9 Oct 2020 16:30:35 +0200
> John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> wrote:
> 
>> 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 

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?

> 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

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SMP is broken on sparc64 with kernel 4.x/5.x
  2020-10-09 14:19 SMP is broken on sparc64 with kernel 4.x/5.x Wolf Ruediger Spielmann
                   ` (2 preceding siblings ...)
  2020-10-09 14:49 ` John Paul Adrian Glaubitz
@ 2020-10-09 15:50 ` Wolf Ruediger Spielmann
  2020-10-09 20:46 ` Wolf Ruediger Spielmann
  4 siblings, 0 replies; 6+ messages in thread
From: Wolf Ruediger Spielmann @ 2020-10-09 15:50 UTC (permalink / raw)
  To: sparclinux

Hi Adrian,

On Fri, 9 Oct 2020 16:49:32 +0200
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> wrote:

> On 10/9/20 4:40 PM, Wolf Ruediger Spielmann wrote:
> > 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SMP is broken on sparc64 with kernel 4.x/5.x
  2020-10-09 14:19 SMP is broken on sparc64 with kernel 4.x/5.x Wolf Ruediger Spielmann
                   ` (3 preceding siblings ...)
  2020-10-09 15:50 ` Wolf Ruediger Spielmann
@ 2020-10-09 20:46 ` Wolf Ruediger Spielmann
  4 siblings, 0 replies; 6+ messages in thread
From: Wolf Ruediger Spielmann @ 2020-10-09 20:46 UTC (permalink / raw)
  To: sparclinux

Hi Adrian,

On Fri, 9 Oct 2020 16:49:32 +0200
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> wrote:
> > 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?
> 
> > 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-10-09 20:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-09 14:19 SMP is broken on sparc64 with kernel 4.x/5.x Wolf Ruediger Spielmann
2020-10-09 14:30 ` John Paul Adrian Glaubitz
2020-10-09 14:40 ` Wolf Ruediger Spielmann
2020-10-09 14:49 ` John Paul Adrian Glaubitz
2020-10-09 15:50 ` Wolf Ruediger Spielmann
2020-10-09 20:46 ` Wolf Ruediger Spielmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.