NetBSD-Bugs archive

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

port-sparc/59682: qemu idles CPUs by spinning them at 100%



>Number:         59682
>Category:       port-sparc
>Synopsis:       qemu idles CPUs by spinning them at 100%
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-sparc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 02 12:50:00 +0000 2025
>Originator:     Taylor R Campbell
>Release:        9, 10
>Organization:
The SparcBSD Qemu Excitation
>Environment:
>Description:

	Before this change, qemu would only idle one CPU, not all CPUs,
	when the system is idle, and instead spin the other CPUs at
	100% capacity:

Module Name:    src
Committed By:   jdc
Date:           Sat May 31 15:14:40 UTC 2025

Modified Files:
        src/sys/arch/sparc/dev: apc.c

Log Message:
Set the idle bit for all the CPU's on a multi-processor system.  QEMU uses
this to idle all of the emulated CPU's, otherwise only one CPU is idled.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/sparc/dev/apc.c

https://mail-index.netbsd.org/source-changes/2025/05/31/msg157080.html


>How-To-Repeat:

	1. boot multiprocessor NetBSD/sparc under qemu
	2. do nothing
	3. watch top(1) in the host and see 100% CPU usage


>Fix:

	1. pull up the patch above
	2. consider nixing #ifdef MULTIPROCESSOR -- the iteration over
	   CPUs should compile away into the same thing




Home | Main Index | Thread Index | Old Index