Subject: Re: Tweaking the VAX vm constants.
To: None <ragge@ludd.luth.se>
From: Brian Chase <vaxzilla@jarai.org>
List: port-vax
Date: 12/12/2002 18:51:52
On Thu, 12 Dec 2002 ragge@ludd.luth.se wrote:

> Quick C explanation of the calculation:
>
> #define PROCPTSIZE ((MAXTSIZ + MAXDSIZ + MAXSSIZ + MMAPSPACE) / VAX_NBPG)
> usrptsize = PROCPTSIZE * maxproc;
>
> The above gives the number of PTEs needed in the kernel page table for
> keeping the user page table. Having maxproc == 128 will result in a need for
> ((8*1024*1024 + 64*1024*1024 + 8*1024*1024 + 8*1024*1024)/512) * 128 ptes,
> which is 23068672*sizeof(struxt pte) == 92274688 or 88MB kernel virtual
> memory. This in turn allocates 92274688/(VAX_NBPG/sizeof(struxt pte)) bytes
> or 704KB of physical memory, which is about 20% of available memory on a 4MB
> machine.
>
> The main problem is that mmap() of memory is done above the data segment,
> so all running processes are likely to use (almost) its full page table.
> Increasing MAXDSIZ to the double would almost double the amount of physical
> memory required.

Thanks.  This explanation was really helpful.  I think the current MAX
values you've put in vmparam.h are more than adequate for nearly
everything I've come across thus far.  I'm currently battling the
libiconv package.

> Someone was working at moving the mmap area to just below the user stack
> instead, if that could be done this would not be an issue anymore.

Is this a change specific to the VAX port, or is thing something machine
independent?

-brian.