* 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
| 1153 | * improving the effectiveness of clustering. |
| 1154 | */ |
| 1155 | static int |
| 1156 | vm_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 |
no test coverage detected