From nobody@FreeBSD.org  Fri Jan 19 15:48:37 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 4520716A402
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 19 Jan 2007 15:48:37 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id 3634413C441
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 19 Jan 2007 15:48:37 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l0JFmbFZ087934
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 19 Jan 2007 15:48:37 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l0JFmal4087933;
	Fri, 19 Jan 2007 15:48:36 GMT
	(envelope-from nobody)
Message-Id: <200701191548.l0JFmal4087933@www.freebsd.org>
Date: Fri, 19 Jan 2007 15:48:36 GMT
From: Bill Moran<wmoran@collaborativefusion.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: pmap.c panic message references a sysctl that doesn't exist
X-Send-Pr-Version: www-3.0

>Number:         108121
>Category:       kern
>Synopsis:       [pmap] pmap.c panic message references a sysctl that doesn't exist
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ade
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 19 15:50:20 GMT 2007
>Closed-Date:    Tue Jan 30 01:10:05 GMT 2007
>Last-Modified:  Tue Jan 30 01:10:05 GMT 2007
>Originator:     Bill Moran
>Release:        Tested on both 6.1 and 6.2
>Organization:
Collaborative Fusion Inc.
>Environment:
FreeBSD db00.lab00 6.2-RELEASE FreeBSD 6.2-RELEASE #1: Thu Jan 18 17:19:48 EST 2007     root@db00.lab00:/usr/obj/usr/src/sys/DB-2850-amd64  amd64
>Description:
See the following thread on -questions@ for some information:
http://lists.freebsd.org/pipermail/freebsd-questions/2007-January/140286.html

It appears as if pmap.c contains an error message suggesting the user
increase a sysctl that doesn't exist:
panic("no pv entries: increase vm.pmap.shpgperproc");

This panic string exists in the alpha, amd64, i386, and ia64 versions of
pmap.c.  It does not exist in the arm version.

`sysctl -a | grep pmap` does not list any sysctls.

The usual answer to this is to rebuild a kernel with PMAP_SHPGPERPROC
set to a higher value.

Not sure why the sysctl isn't available.
>How-To-Repeat:
Not sure how to reliably create the panic situation, but I don't believe that's the real issue.  grepping the sysctl and the source should provide the rest of the information.
>Fix:
My preference would be to actually make the value tunable via sysctl,
but I have no idea how difficult that would be.

If it can not be made available via sysctl, the message should probably
be changed to recommend rebuilding the kernel, as is done in
sys/vm/vm_pageout.c
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ade 
State-Changed-When: Tue Jan 30 01:04:41 UTC 2007 
State-Changed-Why:  
The message is correct.  However, it is *NOT* a sysctl, rather it is a 
tunable that can be set in /boot/loader.conf eg: 

vm.pmap.shpgperproc=1000 

Making this a sysctl, with the ability to dynamically change it whilst 
the system is running would be Exceptionally Hard[tm]. 

One could possibly make a case for providing a read-only sysctl, though 
it is likely to be of very limited use, since pv exhaustion is not by 
any means a typical occurance. 


Responsible-Changed-From-To: freebsd-bugs->ade 
Responsible-Changed-By: ade 
Responsible-Changed-When: Tue Jan 30 01:04:41 UTC 2007 
Responsible-Changed-Why:  
Since I provided the specific "fix" (in terms of an appropriate panic, 
rather than letting the kernel wander off into la-la land as was the 
case previously), I'll assume (some of ;) the responsibility... 

http://www.freebsd.org/cgi/query-pr.cgi?pr=108121 
>Unformatted:
