Subject: Re: panic: too much memory(!)
To: None <port-i386@NetBSD.ORG>
From: Christoph Badura <bad@ora.de>
List: port-i386
Date: 08/19/1997 20:21:26
cjs@portal.ca (Curt Sampson) writes:
>On Tue, 19 Aug 1997, Christoph Badura wrote:

>> >using 1388 buffers containing 33980416 bytes of memory
>> ...
>> You should probably use at least 4200 buffers with that large a buffer
>> cache.

>Good luck. You can't have more than 1388 buffers on the i386 at
>the moment, because it runs out of address space for them: each
>buffer uses 64K of address space. (Which means that on most
>systems--with 8K blocks--there's not much point in having more than
>11 MB of buffer memory allocated.)

Ah, I remember that discussion.  So he needs to decrease the BUFPAGES
option.

I still think it's worth filing a PR.  The condition that triggers the
panic looks fishy to me.  cluster_rbuild requests a temporary buffer.
If that buffer has memory allocated and the size of that memory plus
the "current" request size is larger then MAXBSIZE it wants to terminate
the cluster early.  With "option DIAGNOSTIC" this panic gets triggered
immediately in this case if the temp buffer hasn't MAXBSIZE memory
allocated to it.  Since it requested a buffer of zero size,
I don't think it is safe to assert that getblk returns either a zero
sized buffer or a MAXBSIZE sized buffer.
-- 
Christoph Badura

Now available in print: Lion's Commentary on UNIX 6th Edition, with Source Code
			http://www.peer-to-peer.com/