Subject: kern/15503: uvm_anon_add: can not allocate 179199 anons
To: None <>
From: None <>
List: netbsd-bugs
Date: 02/06/2002 11:37:30
>Number:         15503
>Category:       kern
>Synopsis:       panic: uvm_add_anon with big swap ( > 512M ?)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 05 18:38:00 PST 2002
>Originator:     Makoto Fujiwara
>Release:        NetBSD 1.5.2 and 1.5.3_ALPHA
	NetBSD harry 1.5.3_ALPHA NetBSD 1.5.3_ALPHA (GENERIC-insecure-modem) #0: 
	Tue Feb 5 14:22:55 JST 2002 
	1.5.2 release and 1.5.3_ALPHA kernel panics if big swap is defined in /etc/fstab
        ( or later by swapon command). Following example is with 1G swap,
	root file system type: ffs
	uvm_anon_add: can not allocate 255999 anons
	panic: uvm_anon_add
	Stopped in swapctl at cpu_Debugger+0x10:      lwz r0, r1, 0x14,
	db> trace
	at panic+e8
	at uvm_anon_add+a0
	at sys_swapctl+864
	at sys_swapctl+420
	at trap+400
	at ddblow+e0

	boot 1.5.2 or 1.5.3_ALPHA to multiuser with big swap defined.
       ( I have tested with 720M and 1G).
	pull the changes described in	
	uvm/uvm_anon.h 1.12 -> 1.13
	uvm/uvm_anon.c 1.10 -> 1.11
	uvm/uvm_swap.c 1.42 -> 1.43

	By this fix, kernel won't panic, but swapctl will say,
	/dev/wd0b: Cannot Allocate memory
	and swap still won't be attached.