NetBSD Problem Report #61076
From www@netbsd.org Wed Nov 25 14:37:37 2026
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) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.netbsd.org", Issuer "YR1" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 5D4A71A923B
for <gnats-bugs@gnats.NetBSD.org>; Wed, 25 Nov 2026 14:37:37 +0000 (UTC)
Message-Id: <20261125143736.277EE1A923D@mollari.NetBSD.org>
Date: Wed, 25 Nov 2026 14:37:36 +0000 (UTC)
From: thorpej@me.com
Reply-To: thorpej@me.com
To: gnats-bugs@NetBSD.org
Subject: pmap_remove_all() could use more context
X-Send-Pr-Version: www-1.0
X-From4GNATS: "thorpej@me.com via gnats" <gnats-admin@NetBSD.org>
>Number: 61076
>Category: kern
>Synopsis: pmap_remove_all() could use more context
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: thorpej
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed Nov 25 14:40:01 +0000 2026
>Last-Modified: Wed Nov 25 14:45:14 +0000 2026
>Originator: Jason R. Thorpe
>Release: NetBSD 11.99.11
>Organization:
Retro-grouches'R'Us
>Environment:
NetBSD virt68k 11.99.11 NetBSD 11.99.11 (GENERIC) #332: Wed Nov 25 07:07:27 EST 2026 thorpej@Mac:/Users/thorpej/NetBSD/current/src/sys/arch/virt68k/compile/GENERIC virt68k
>Description:
pmap_remove_all() is called in two places:
- uvmspace_exec()
- uvmspace_free()
In the former, the pmap is going to be re-used to load up a fresh address space.
In the latter, the pmap is going to be almost immediately destroyed.
It would be useful for pmap_remove_all() to know which of these cases is in play, as it might be able to make optimizations based on this information.
>How-To-Repeat:
N/A
>Fix:
Suggested change: add a "bool dying" argument to pmap_remove_all(). If true, it would indicate that this particular instantiation of the pmap will never be re-activated and will subsequently be destroyed.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: kern-bug-people->thorpej
Responsible-Changed-By: thorpej@NetBSD.org
Responsible-Changed-When: Wed, 25 Nov 2026 14:45:14 +0000
Responsible-Changed-Why:
Take. This is mostly a place-holder for an idea, and it may turn out
to be a nothingburger.
>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.