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

Function vm_page_pqbatch_submit

freebsd/vm/vm_page.c:3590–3618  ·  view source on GitHub ↗

* vm_page_pqbatch_submit: [ internal use only ] * * Enqueue a page in the specified page queue's batched work queue. * The caller must have encoded the requested operation in the page * structure's a.flags field. */

Source from the content-addressed store, hash-verified

3588 * structure's a.flags field.
3589 */
3590void
3591vm_page_pqbatch_submit(vm_page_t m, uint8_t queue)
3592{
3593 struct vm_batchqueue *bq;
3594 struct vm_pagequeue *pq;
3595 int domain;
3596
3597 KASSERT((m->oflags & VPO_UNMANAGED) == 0,
3598 ("page %p is unmanaged", m));
3599 KASSERT(queue < PQ_COUNT, ("invalid queue %d", queue));
3600
3601 domain = vm_page_domain(m);
3602 critical_enter();
3603 bq = DPCPU_PTR(pqbatch[domain][queue]);
3604 if (vm_batchqueue_insert(bq, m)) {
3605 critical_exit();
3606 return;
3607 }
3608 critical_exit();
3609
3610 pq = &VM_DOMAIN(domain)->vmd_pagequeues[queue];
3611 vm_pagequeue_lock(pq);
3612 critical_enter();
3613 bq = DPCPU_PTR(pqbatch[domain][queue]);
3614 vm_pqbatch_process(pq, bq, queue);
3615 vm_pqbatch_process_page(pq, m, queue);
3616 vm_pagequeue_unlock(pq);
3617 critical_exit();
3618}
3619
3620/*
3621 * vm_page_pqbatch_drain: [ internal use only ]

Callers 4

vm_page_pqstate_commitFunction · 0.85
vm_page_enqueueFunction · 0.85
vm_pageout_deferFunction · 0.85

Calls 6

vm_page_domainFunction · 0.85
vm_batchqueue_insertFunction · 0.85
vm_pqbatch_processFunction · 0.85
vm_pqbatch_process_pageFunction · 0.85
critical_enterFunction · 0.50
critical_exitFunction · 0.50

Tested by

no test coverage detected