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

Function pagedaemon_wakeup

freebsd/vm/vm_pageout.c:2397–2413  ·  view source on GitHub ↗

* Perform an advisory wakeup of the page daemon. */

Source from the content-addressed store, hash-verified

2395 * Perform an advisory wakeup of the page daemon.
2396 */
2397void
2398pagedaemon_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}

Callers 1

_vm_domain_allocateFunction · 0.85

Calls 2

atomic_fetchadd_intFunction · 0.50
wakeupFunction · 0.50

Tested by

no test coverage detected