MCPcopy Create free account
hub / github.com/F-Stack/f-stack / pmap_allocpte_alloc

Function pmap_allocpte_alloc

freebsd/amd64/amd64/pmap.c:4526–4541  ·  view source on GitHub ↗

* This routine is called if the desired page table page does not exist. * * If page table page allocation fails, this routine may sleep before * returning NULL. It sleeps only if a lock pointer was given. Sleep * occurs right before returning to the caller. This way, we never * drop pmap lock to sleep while a page table page has ref_count == 0, * which prevents the page from being freed un

Source from the content-addressed store, hash-verified

4524 * which prevents the page from being freed under us.
4525 */
4526static vm_page_t
4527pmap_allocpte_alloc(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp,
4528 vm_offset_t va)
4529{
4530 vm_page_t m;
4531
4532 m = pmap_allocpte_nosleep(pmap, ptepindex, lockp, va);
4533 if (m == NULL && lockp != NULL) {
4534 RELEASE_PV_LIST_LOCK(lockp);
4535 PMAP_UNLOCK(pmap);
4536 PMAP_ASSERT_NOT_IN_DI();
4537 vm_wait(NULL);
4538 PMAP_LOCK(pmap);
4539 }
4540 return (m);
4541}
4542
4543static pd_entry_t *
4544pmap_alloc_pde(pmap_t pmap, vm_offset_t va, vm_page_t *pdpgp,

Callers 6

pmap_alloc_pdeFunction · 0.85
pmap_allocpteFunction · 0.85
pmap_enter_largepageFunction · 0.85
pmap_enterFunction · 0.85
pmap_enter_quick_lockedFunction · 0.85
pmap_copyFunction · 0.85

Calls 2

pmap_allocpte_nosleepFunction · 0.85
vm_waitFunction · 0.85

Tested by

no test coverage detected