Subject: Re: Old VAX notes from dmr.
To: Anders Magnusson <ragge@ludd.luth.se>
From: David Brownlee <abs@netbsd.org>
List: port-vax
Date: 01/01/2000 01:52:09
On Thu, 30 Dec 1999, Anders Magnusson wrote:

> A VAX page table entry (PTE) is 4 bytes and maps one 512 byte page.
> The total addressable user virtual address space is 2GB; to map that
> it would need 16MB of (pageable) page tables. This is per process.
> If the system can handle 100 processes the virtual address space that
> would be allocated in the kernel would be 1600MB. To map this virtual 
> space 12.8MB of physical pre-allocated memory would be needed. That's
> much in a 8MB machine... :-)
> 
> A way to avoid this, which I plan to implement, is to have only a small
> number of User PTE "slots", and when there is a process switch the kernel
> first checks if the new process have a slot already. If it has, just a 
> "normal" switch is done, if it hasn't, use LRU to throw out the oldest
> process. This wouldn't give any noticeable performance penalty except 
> if the number of running processes (running, not existing) exceeds
> the number of slots.
> 
> The number of slots would be a compile-time constant.

	Would it make sense to allow '0' to mean 'scale according to RAM',
	so a GENERIC kernel can make a reasonable guess.

	Are there any plans to make the max VM space for a process
	changeable? - on a 4MB machine I can imagine people setting
	it to 128MB to save precious RAM on those tables :)

		David/absolute