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

Function vm_pageout_active_target

freebsd/vm/vm_pageout.c:1155–1165  ·  view source on GitHub ↗

* Compute the number of pages we want to try to move from the * active queue to either the inactive or laundry queue. * * When scanning active pages during a shortage, we make clean pages * count more heavily towards the page shortage than dirty pages. * This is because dirty pages must be laundered before they can be * reused and thus have less utility when attempting to quickly * alleviat

Source from the content-addressed store, hash-verified

1153 * improving the effectiveness of clustering.
1154 */
1155static int
1156vm_pageout_active_target(struct vm_domain *vmd)
1157{
1158 int shortage;
1159
1160 shortage = vmd->vmd_inactive_target + vm_paging_target(vmd) -
1161 (vmd->vmd_pagequeues[PQ_INACTIVE].pq_cnt +
1162 vmd->vmd_pagequeues[PQ_LAUNDRY].pq_cnt / act_scan_laundry_weight);
1163 shortage *= act_scan_laundry_weight;
1164 return (shortage);
1165}
1166
1167/*
1168 * Scan the active queue. If there is no shortage of inactive pages, scan a

Callers 1

vm_pageout_workerFunction · 0.85

Calls 1

vm_paging_targetFunction · 0.85

Tested by

no test coverage detected