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

Function vm_page_dequeue

freebsd/vm/vm_page.c:3690–3708  ·  view source on GitHub ↗

* vm_page_dequeue: * * Remove the page from whichever page queue it's in, if any, before * returning. */

Source from the content-addressed store, hash-verified

3688 * returning.
3689 */
3690void
3691vm_page_dequeue(vm_page_t m)
3692{
3693 vm_page_astate_t new, old;
3694
3695 old = vm_page_astate_load(m);
3696 do {
3697 if (old.queue == PQ_NONE) {
3698 KASSERT((old.flags & PGA_QUEUE_STATE_MASK) == 0,
3699 ("%s: page %p has unexpected queue state",
3700 __func__, m));
3701 break;
3702 }
3703 new = old;
3704 new.flags &= ~PGA_QUEUE_OP_MASK;
3705 new.queue = PQ_NONE;
3706 } while (!vm_page_pqstate_commit_dequeue(m, &old, new));
3707
3708}
3709
3710/*
3711 * Schedule the given page for insertion into the specified page queue.

Callers 5

vm_page_reclaim_runFunction · 0.85
vm_page_unswappableFunction · 0.85

Calls 2

vm_page_astate_loadFunction · 0.85

Tested by

no test coverage detected