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

Function pmap_try_insert_pv_entry

freebsd/arm64/arm64/pmap.c:2771–2787  ·  view source on GitHub ↗

* Conditionally create the PV entry for a 4KB page mapping if the required * memory can be allocated without resorting to reclamation. */

Source from the content-addressed store, hash-verified

2769 * memory can be allocated without resorting to reclamation.
2770 */
2771static boolean_t
2772pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va, vm_page_t m,
2773 struct rwlock **lockp)
2774{
2775 pv_entry_t pv;
2776
2777 PMAP_LOCK_ASSERT(pmap, MA_OWNED);
2778 /* Pass NULL instead of the lock pointer to disable reclamation. */
2779 if ((pv = get_pv_entry(pmap, NULL)) != NULL) {
2780 pv->pv_va = va;
2781 CHANGE_PV_LIST_LOCK_TO_VM_PAGE(lockp, m);
2782 TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_next);
2783 m->md.pv_gen++;
2784 return (TRUE);
2785 } else
2786 return (FALSE);
2787}
2788
2789/*
2790 * Create the PV entry for a 2MB page mapping. Always returns true unless the

Callers 2

pmap_enter_quick_lockedFunction · 0.70
pmap_copyFunction · 0.70

Calls 1

get_pv_entryFunction · 0.70

Tested by

no test coverage detected