Changeset View
Changeset View
Standalone View
Standalone View
head/sys/i386/i386/pmap.c
Show First 20 Lines • Show All 2,459 Lines • ▼ Show 20 Lines | free_pv_chunk(struct pv_chunk *pc) | ||||
TAILQ_REMOVE(&pv_chunks, pc, pc_lru); | TAILQ_REMOVE(&pv_chunks, pc, pc_lru); | ||||
PV_STAT(pv_entry_spare -= _NPCPV); | PV_STAT(pv_entry_spare -= _NPCPV); | ||||
PV_STAT(pc_chunk_count--); | PV_STAT(pc_chunk_count--); | ||||
PV_STAT(pc_chunk_frees++); | PV_STAT(pc_chunk_frees++); | ||||
/* entire chunk is free, return it */ | /* entire chunk is free, return it */ | ||||
m = PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)pc)); | m = PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)pc)); | ||||
pmap_qremove((vm_offset_t)pc, 1); | pmap_qremove((vm_offset_t)pc, 1); | ||||
vm_page_unwire(m, PQ_NONE); | vm_page_unwire_noq(m); | ||||
vm_page_free(m); | vm_page_free(m); | ||||
pmap_ptelist_free(&pv_vafree, (vm_offset_t)pc); | pmap_ptelist_free(&pv_vafree, (vm_offset_t)pc); | ||||
} | } | ||||
/* | /* | ||||
* get a new pv_entry, allocating a block from the system | * get a new pv_entry, allocating a block from the system | ||||
* when needed. | * when needed. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 3,677 Lines • Show Last 20 Lines |