NetBSD Problem Report #59682
From www@netbsd.org Thu Oct 2 12:46:01 2025
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits)
client-signature RSA-PSS (2048 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 8393E1A9239
for <gnats-bugs@gnats.NetBSD.org>; Thu, 2 Oct 2025 12:46:01 +0000 (UTC)
Message-Id: <20251002124600.62BB21A923C@mollari.NetBSD.org>
Date: Thu, 2 Oct 2025 12:46:00 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: qemu idles CPUs by spinning them at 100%
X-Send-Pr-Version: www-1.0
>Number: 59682
>Category: port-sparc
>Synopsis: qemu idles CPUs by spinning them at 100%
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: jdc
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Oct 02 12:50:00 +0000 2025
>Closed-Date: Wed Sep 16 06:05:04 +0000 2026
>Last-Modified: Wed Sep 16 06:05:04 +0000 2026
>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
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: port-sparc-maintainer->jdc
Responsible-Changed-By: riastradh@NetBSD.org
Responsible-Changed-When: Sun, 05 Oct 2025 18:54:08 +0000
Responsible-Changed-Why:
Can I trouble you to pull this up?
From: Martin Husemann <martin@duskware.de>
To: Julian Coleman <jdc@coris.org.uk>
Cc: pullup-10@netbsd.org
Subject: Re: [pullup-10 #1181] Sparc APC vs. QEMU
Date: Mon, 20 Oct 2025 16:06:51 +0200
Pulled up to netbsd-10, changes entry:
sys/arch/sparc/dev/apc.c 1.3
sparc: hack to inform QEMU about idle CPUs.
Thanks!
From: "Julian Coleman" <jdc@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59682 CVS commit: src/sys/arch/sparc/dev
Date: Tue, 15 Sep 2026 18:15:35 +0000
Module Name: src
Committed By: jdc
Date: Tue Sep 15 18:15:35 UTC 2026
Modified Files:
src/sys/arch/sparc/dev: apc.c
Log Message:
Remove the #ifdef MULTIPROCESSOR and just use the CPU iterator.
PR 59682
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/sparc/dev/apc.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: jdc@NetBSD.org
State-Changed-When: Wed, 16 Sep 2026 06:05:04 +0000
State-Changed-Why:
Pulled up to 10 [pullup-10 #1181] and #ifdef MULTIPROCESSOR removed.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.