* Perform an advisory wakeup of the page daemon. */
| 2395 | * Perform an advisory wakeup of the page daemon. |
| 2396 | */ |
| 2397 | void |
| 2398 | pagedaemon_wakeup(int domain) |
| 2399 | { |
| 2400 | struct vm_domain *vmd; |
| 2401 | |
| 2402 | vmd = VM_DOMAIN(domain); |
| 2403 | vm_domain_pageout_assert_unlocked(vmd); |
| 2404 | if (curproc == pageproc) |
| 2405 | return; |
| 2406 | |
| 2407 | if (atomic_fetchadd_int(&vmd->vmd_pageout_wanted, 1) == 0) { |
| 2408 | vm_domain_pageout_lock(vmd); |
| 2409 | atomic_store_int(&vmd->vmd_pageout_wanted, 1); |
| 2410 | wakeup(&vmd->vmd_pageout_wanted); |
| 2411 | vm_domain_pageout_unlock(vmd); |
| 2412 | } |
| 2413 | } |
no test coverage detected