* vm_waitpfault: * * Sleep until free pages are available for allocation. * - Called only in vm_fault so that processes page faulting * can be easily tracked. * - Sleeps at a lower priority than vm_wait() so that vm_wait()ing * processes will be able to grab memory first. Do not change * this balance without careful testing first. */
| 3320 | * this balance without careful testing first. |
| 3321 | */ |
| 3322 | void |
| 3323 | vm_waitpfault(struct domainset *dset, int timo) |
| 3324 | { |
| 3325 | |
| 3326 | /* |
| 3327 | * XXX Ideally we would wait only until the allocation could |
| 3328 | * be satisfied. This condition can cause new allocators to |
| 3329 | * consume all freed pages while old allocators wait. |
| 3330 | */ |
| 3331 | mtx_lock(&vm_domainset_lock); |
| 3332 | if (vm_page_count_min_set(&dset->ds_mask)) { |
| 3333 | vm_min_waiters++; |
| 3334 | msleep(&vm_min_domains, &vm_domainset_lock, PUSER | PDROP, |
| 3335 | "pfault", timo); |
| 3336 | } else |
| 3337 | mtx_unlock(&vm_domainset_lock); |
| 3338 | } |
| 3339 | |
| 3340 | static struct vm_pagequeue * |
| 3341 | _vm_page_pagequeue(vm_page_t m, uint8_t queue) |
no test coverage detected