tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: mmap implementation advice needed.
>> 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.
> Let me try to rephrase that:
> The first level page table of VAX needs up to 128K (for each of the
> two ranges?) as contiguous physical space.
Not quite.
"[F]irst level" is correct from one perspective (two PTE lookups are
potentially necessary to resolve a userland address to a physical
address) but incorrect from another (the "second" level is entirely
implicit, implicit in P0/P1 PTEs living in system space).
And I (and ragge, I think it was) misspoke. It doesn't quite require
128K of contiguous physical space. It needs two 64K blocks of
physically contiguous space, both within the block that maps system
space. (Nothing says that P0 PTEs have to be anywhere near P1 PTEs in
system virtual space, but they do have to be within system space.)
> The second level page table needs 16M in some block size, but they
> don't need to be all contigously?
Not quite.
Userland conceptually has just a single level of PTEs; it's just that
those PTEs live not in physical space but in system ("kernel") virtual
space. The resulting system->physical lookups are not based directly
on the userland address, the way they would be with a typical two-level
page table system (as I understand them), but rather they are ordinary
system->physical lookups based on the PTE's (system) virtual address.
/~\ 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