summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_linker.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2006-06-20 20:52:11 +0000
committeralc <alc@FreeBSD.org>2006-06-20 20:52:11 +0000
commit13b4d6433549f362069fbe0a26fef8d45822616d (patch)
treedd95f5367ceaac132485bd3e4de0f2ad5baa01c0 /sys/kern/kern_linker.c
parent26a001f93c9b3d2eb5ceb24e3729f741def07ed7 (diff)
downloadFreeBSD-src-13b4d6433549f362069fbe0a26fef8d45822616d.zip
FreeBSD-src-13b4d6433549f362069fbe0a26fef8d45822616d.tar.gz
Change get_pv_entry() such that the call to vm_page_alloc() specifies
VM_ALLOC_NORMAL instead of VM_ALLOC_SYSTEM when try is TRUE. In other words, when get_pv_entry() is permitted to fail, it no longer tries as hard to allocate a page. Change pmap_enter_quick_locked() to fail rather than wait if it is unable to allocate a page table page. This prevents a race between pmap_enter_object() and the page daemon. Specifically, an inactive page that is a successor to the page that was given to pmap_enter_quick_locked() might become a cache page while pmap_enter_quick_locked() waits and later pmap_enter_object() maps the cache page violating the invariant that cache pages are never mapped. Similarly, change pmap_enter_quick_locked() to call pmap_try_insert_pv_entry() rather than pmap_insert_entry(). Generally speaking, pmap_enter_quick_locked() is used to create speculative mappings. So, it should not try hard to allocate memory if free memory is scarce. Add an assertion that the object containing m_start is locked in pmap_enter_object(). Remove a similar assertion from pmap_enter_quick_locked() because that function no longer accesses the containing object. Remove a stale comment. Reviewed by: ups@
Diffstat (limited to 'sys/kern/kern_linker.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud