Subject: Re: UVM questions.
To: Anders Magnusson <firstname.lastname@example.org>
From: Chuck Silvers <email@example.com>
Date: 07/02/1999 00:18:07
uvm_km_valloc_wait() always allocates pageable memory.
a submap should really only be used if you need a separate lock
for the region, which is only if allocations in the region are
done in interrupt handlers. this pte_map is only for user page table
in general, I'd recommend stealing code from the i386 pmap as much as possible.
Anders Magnusson writes:
> I have lately trying to find what causes the problem with swapping
> on vax. After much searching I have found that the following does not
> seem to do what I think. Scenario:
> A submap is created for page tables:
> pte_map = uvm_km_suballoc(kernel_map, &ptemapstart, &ptemapend,
> USRPTSIZE * 4 * maxproc, FALSE, FALSE, &pte_map_store);
> This would (I assume) create a submap with unpageable entries.
> Page tables are allocated with:
> pmap->pm_p0br = (void *)uvm_km_valloc_wait(pte_map, bytesiz);
> which would then allow pages to be faulted in on demand, and the pages
> would be unpageable. BUT:
> As soon as the system comes short of memory, uvmpd_scan() starts to unmap
> those pages, via pmap_page_protect(). Why? What is the mechanism that
> controls if pages should be paged or not?
> This is kind of fatal, because VAXen normally needs swapping :-)
> -- Ragge