summaryrefslogtreecommitdiffstats
path: root/lib/libc/asr/asr_utils.c
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2013-11-24 22:08:23 +0000
committermiod <miod@openbsd.org>2013-11-24 22:08:23 +0000
commit3f449c321cec1189f21146f8c2b6844fe9ef2d4f (patch)
treed75b20402241fd87833252c17cca17b2a37f8adc /lib/libc/asr/asr_utils.c
parentmore ctype cleanups (diff)
downloadwireguard-openbsd-3f449c321cec1189f21146f8c2b6844fe9ef2d4f.tar.xz
wireguard-openbsd-3f449c321cec1189f21146f8c2b6844fe9ef2d4f.zip
Rework pmap to use dynamic P0 and P1 region allocation, instead of allocating
the largest possible page table for every pmap; from NetBSD. This allows the kernel to use much less memory for page tables. Significant differences against the NetBSD code are: - allocation of page table pages is done with a pool instead of allocating whole logical pages from uvm and managing the freelist within pmap, never releasing allocated pages. - try to use pt_entry_t * rather than int * whenever possible. - growth of P0 and P1 regions is allowed to fail, if invoked from pmap_enter with the PMAP_CANFAIL flag. This will stall processes until memory for the page tables can be obtained, rather than panicing, in most cases. - keep management of mappings for managed pages using pv lists tied to the vm_page (using __HAVE_VM_PAGE_MD), rather than a global pv_list head. - bound check against Sysmap[] in pmap_extract() when asked for a kernel address. As a result of this, bsd.rd can now install a working system on a 12MB machine without needing to enable swap.
Diffstat (limited to 'lib/libc/asr/asr_utils.c')
0 files changed, 0 insertions, 0 deletions