Subject: Re: README: kernel pty struct allocation change
To: David Maxwell <david@vex.net>
From: Jaromír Doleček <dolecek@ibis.cz>
List: tech-kern
Date: 09/10/2000 13:43:01
David Maxwell wrote:
> I'd like to suggest that there be some way of triggering a de-allocation
> though, otherwise high settings (like the default of 512) may allow for
> a memory consumption based denial of service. It would be nice to have
> some way of recovering that RAM without rebooting.

I will think about it - this would require little more work, since
we would have to avoid freeing still used structures.

For now, I'll only lower the defaults so that initial number
of pty entries is 16 and default maximum is 256.

> Additionally Any particular reason the sysctl can't be lowered as 
> far as the number of currently allocated structs? For similar reasons

There is no particular reason. I'll change the code to make this possible.

> to the above... I notice I have very little free memory. I request
> freeing of unused structs. Now I want to lock down the sysctl to
> current_usage+slack but I can't lower it without building a new
> kernel and rebooting.

It would be nice if there would also be some hook from uvm to request
freeing unneeded memory if physical memory is scarce. 

Jaromir
-- 
Jaromir Dolecek <jdolecek@NetBSD.org>      http://www.ics.muni.cz/~dolecek/
@@@@  Wanna a real operating system ? Go and get NetBSD, damn!  @@@@