From freaky@voi.aagh.net  Wed Mar 15 18:17:13 2006
Return-Path: <freaky@voi.aagh.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 2516016A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 15 Mar 2006 18:17:13 +0000 (UTC)
	(envelope-from freaky@voi.aagh.net)
Received: from spork.qfe3.net (spork.qfe3.net [212.13.207.101])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 0A3F943D4C
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 15 Mar 2006 18:17:09 +0000 (GMT)
	(envelope-from freaky@voi.aagh.net)
Received: from [81.104.54.68] (helo=voi.aagh.net)
	by spork.qfe3.net with esmtp (Exim 4.60 (FreeBSD))
	(envelope-from <freaky@voi.aagh.net>)
	id 1FJaYW-0005y6-Lw
	for FreeBSD-gnats-submit@freebsd.org; Wed, 15 Mar 2006 18:17:08 +0000
Received: from freaky by voi.aagh.net with local (Exim 4.54 (FreeBSD))
	id 1FJaYW-000De5-Gm
	for FreeBSD-gnats-submit@freebsd.org; Wed, 15 Mar 2006 18:17:08 +0000
Message-Id: <E1FJaYW-000De5-Gm@voi.aagh.net>
Date: Wed, 15 Mar 2006 18:17:08 +0000
From: Thomas Hurst <tom@hur.st>
Sender: Thomas Hurst <freaky@voi.aagh.net>
Reply-To: Thomas Hurst <tom@hur.st>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Setting PMAP_SHPGPERPROC in kernel config has no effect
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         94509
>Category:       conf
>Synopsis:       Setting PMAP_SHPGPERPROC in kernel config has no effect
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 15 18:20:07 GMT 2006
>Closed-Date:    Sat Apr 22 20:53:34 GMT 2006
>Last-Modified:  Sat Apr 22 20:53:34 GMT 2006
>Originator:     Thomas Hurst
>Release:        FreeBSD 6.1-PRERELEASE amd64
>Organization:
Newzbin Limited
>Environment:
System: FreeBSD search1.newzbin.com 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #0: Wed Mar 15 16:25:27 UTC 2006     root@search1.newzbin.com:/usr/obj/usr/src/sys/X4100_SEARCHSERVER  amd64

>Description:
	This machine has a process group which shares ~2GB of anonymous memory between
	a bunch of processes, resulting in:
	
	"collecting pv entries -- suggest increasing PMAP_SHPGPERPROC"

	Setting "options PMAP_SHPGPERPROC=400" in amd64 kernel config has no effect,
	meaning I had to edit amd64/pmap.c directly to increase the available PV entries.
>How-To-Repeat:
	Check upper limit on sysctl vm.zone | grep PV
	Set PMAP_SHPGPERPROC in kernel config to a value != 200.
	Recompile/install kernel.  Recheck limit, find it hasn't changed.

	Verified on 2 different amd64 systems, both running very recent
	RELENG_6.
>Fix:

	Workaround is to edit the constant in /sys/amd64/amd64/pmap.c directly


>Release-Note:
>Audit-Trail:

From: Thomas Hurst <tom@hur.st>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: conf/94509: Setting PMAP_SHPGPERPROC in kernel config has no effect
Date: Sun, 19 Mar 2006 03:11:10 +0000

 Ok, I've tracked it down -- PMAP_SHPGPERPROC is put in opt_pmap.h by
 config(8), and is included on sparc64 and i386, but not amd64:
 
  -# grep -R opt_pmap.h /sys/*/*/pmap.c
  /sys/i386/i386/pmap.c:#include "opt_pmap.h"
  /sys/sparc64/sparc64/pmap.c:#include "opt_pmap.h"
 
 This include needs adding to /sys/amd64/amd64/pmap.c
 
 -- 
 Thomas 'Freaky' Hurst
     http://hur.st/
State-Changed-From-To: open->patched 
State-Changed-By: alc 
State-Changed-When: Thu Apr 13 03:32:54 UTC 2006 
State-Changed-Why:  
Patch applied to CVS HEAD. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94509 
State-Changed-From-To: patched->closed 
State-Changed-By: alc 
State-Changed-When: Sat Apr 22 20:52:52 UTC 2006 
State-Changed-Why:  
All applicable branches are patched. 

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