tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: mmap implementation advice needed.
>> Notes about vax memory management if someone is wondering:
>> - 2 areas (P0 and P1) of size 1G each, P0 grows from bottom, P1
>> grows from top (intended for stack).
(Plus, though only slightly relevant to userland mmap, system area (1G)
and reserved area (1G). P0 space is 0x00000000-0x3fffffff, P1 is
0x40000000-0x7fffffff, system is 0x80000000-0xbfffffff, and reserved is
0xc0000000-0xffffffff.)
> AFAICT, VAX uses a max userland address of 2G, so what exactly is the
> problem? That you can't allocate enough continous memory for the
> PTEs?
Yes.
It takes 4 bytes of PTE to map 512 bytes of VA. (The VAX uses the
small, by today's standards, page size of 512 bytes.) So 2G of
userland space requires 16M of PTEs. Those PTEs must be in system
virtual space. And that 16M of system virtual space requires 128K of
PTEs to map, and _those_ PTEs require contiguous physical space.
There is a VAX variant, the rtVAX, where P0 and P1 space PTEs are not
in system virtual space, but there the situation is even worse - they
are in physical space, so 2G of userland VM requires 16M, not 128K, of
continguous physical space. (As far as I can recall, NetBSD doesn't
support rtVAXen, but I don't recall looking in detail.)
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Home |
Main Index |
Thread Index |
Old Index