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

Function free_pv_chunk_batch

freebsd/amd64/amd64/pmap.c:5178–5201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5176}
5177
5178static void
5179free_pv_chunk_batch(struct pv_chunklist *batch)
5180{
5181 struct pv_chunks_list *pvc;
5182 struct pv_chunk *pc, *npc;
5183 int i;
5184
5185 for (i = 0; i < vm_ndomains; i++) {
5186 if (TAILQ_EMPTY(&batch[i]))
5187 continue;
5188 pvc = &pv_chunks[i];
5189 mtx_lock(&pvc->pvc_lock);
5190 TAILQ_FOREACH(pc, &batch[i], pc_list) {
5191 TAILQ_REMOVE(&pvc->pvc_list, pc, pc_lru);
5192 }
5193 mtx_unlock(&pvc->pvc_lock);
5194 }
5195
5196 for (i = 0; i < vm_ndomains; i++) {
5197 TAILQ_FOREACH_SAFE(pc, &batch[i], pc_list, npc) {
5198 free_pv_chunk_dequeued(pc);
5199 }
5200 }
5201}
5202
5203/*
5204 * Returns a new PV entry, allocating a new PV chunk from the system when

Callers 1

pmap_remove_pagesFunction · 0.85

Calls 3

free_pv_chunk_dequeuedFunction · 0.85
mtx_lockFunction · 0.50
mtx_unlockFunction · 0.50

Tested by

no test coverage detected