Subject: Re: Newbie macppc user with some problems/questions
To: Dave Huang <khym@bga.com>
From: Chuck Silvers <chuq@chuq.com>
List: port-macppc
Date: 01/01/2001 09:11:56
On Sun, Dec 31, 2000 at 05:12:54PM -0600, Dave Huang wrote:
> 2) Why does swapctl -A say "swapctl: /dev/wd0b: Cannot allocate memory"?
> Is there such a thing as too much swap? :) (I made the swap partition
> that size so it could be a dump partition too, but then I found out that
> macppc doesn't do kernel dumps yet...)

unfortunately, yes, there currently is such a thing as too much swap.
the powerpc ports seem to be short on kernel virtual space these days,
and swap space currently uses a fair bit of kernel virtual space.
I haven't had a chance to figure out how to improve the situation yet, tho.


> 4) Also got a kernel panic while trying to compile some stuff from
> pkgsrc:
> 
> panic: pmap_alloc_pv: uvm_km_zalloc() failed
> Stopped in pid 953 (sh) at     cpu_Debugger+0x10:     lwz r0, r1, 0x14,
> db> t
> at panic+e8
> at pmap_copy_page+70
> at pmap_enter+2e0
> at uvm_fault+8b0
> at trap+23c
> at ddblow+e0
> at end+14f6128
> at end+ffcf5f90


this is probably related to the problem adding swap, you're running out
of kernel virtual space.

actually here's the problem:

> using 2867 buffers containing 16484 KB of memory

2867 buffers at 64 KB of virtual space each is 183 MB, which is
the vast majority of the 256 MB of space available on powerpc-based systems.

as a workaround, reduce the amount of memory given to the buffer cache with

	options BUFPAGES="2000"

-Chuck