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

Function vm_pageout_reinsert_inactive

freebsd/vm/vm_pageout.c:1399–1423  ·  view source on GitHub ↗

* Re-add stuck pages to the inactive queue. We will examine them again * during the next scan. If the queue state of a page has changed since * it was physically removed from the page queue in * vm_pageout_collect_batch(), don't do anything with that page. */

Source from the content-addressed store, hash-verified

1397 * vm_pageout_collect_batch(), don't do anything with that page.
1398 */
1399static void
1400vm_pageout_reinsert_inactive(struct scan_state *ss, struct vm_batchqueue *bq,
1401 vm_page_t m)
1402{
1403 struct vm_pagequeue *pq;
1404 vm_page_t marker;
1405 int delta;
1406
1407 delta = 0;
1408 marker = ss->marker;
1409 pq = ss->pq;
1410
1411 if (m != NULL) {
1412 if (vm_batchqueue_insert(bq, m))
1413 return;
1414 vm_pagequeue_lock(pq);
1415 delta += vm_pageout_reinsert_inactive_page(pq, marker, m);
1416 } else
1417 vm_pagequeue_lock(pq);
1418 while ((m = vm_batchqueue_pop(bq)) != NULL)
1419 delta += vm_pageout_reinsert_inactive_page(pq, marker, m);
1420 vm_pagequeue_cnt_add(pq, delta);
1421 vm_pagequeue_unlock(pq);
1422 vm_batchqueue_init(bq);
1423}
1424
1425static void
1426vm_pageout_scan_inactive(struct vm_domain *vmd, int page_shortage)

Callers 1

vm_pageout_scan_inactiveFunction · 0.85

Calls 5

vm_batchqueue_insertFunction · 0.85
vm_batchqueue_popFunction · 0.85
vm_pagequeue_cnt_addFunction · 0.85
vm_batchqueue_initFunction · 0.85

Tested by

no test coverage detected