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

Function vm_page_pqstate_commit_request

freebsd/vm/vm_page.c:3485–3499  ·  view source on GitHub ↗

* Commit a queue state update that encodes a request for a deferred queue * operation. */

Source from the content-addressed store, hash-verified

3483 * operation.
3484 */
3485static bool
3486vm_page_pqstate_commit_request(vm_page_t m, vm_page_astate_t *old,
3487 vm_page_astate_t new)
3488{
3489
3490 KASSERT(old->queue == new.queue || new.queue != PQ_NONE,
3491 ("%s: invalid state, queue %d flags %x",
3492 __func__, new.queue, new.flags));
3493
3494 if (old->_bits != new._bits &&
3495 !vm_page_pqstate_fcmpset(m, old, new))
3496 return (false);
3497 vm_page_pqbatch_submit(m, new.queue);
3498 return (true);
3499}
3500
3501/*
3502 * A generic queue state update function. This handles more cases than the

Callers 1

vm_page_dequeue_deferredFunction · 0.85

Calls 2

vm_page_pqstate_fcmpsetFunction · 0.85
vm_page_pqbatch_submitFunction · 0.85

Tested by

no test coverage detected