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

Function vdbatch_process

freebsd/kern/vfs_subr.c:3411–3436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3409}
3410
3411static void __noinline
3412vdbatch_process(struct vdbatch *vd)
3413{
3414 struct vnode *vp;
3415 int i;
3416
3417 mtx_assert(&vd->lock, MA_OWNED);
3418 MPASS(curthread->td_pinned > 0);
3419 MPASS(vd->index == VDBATCH_SIZE);
3420
3421 mtx_lock(&vnode_list_mtx);
3422 critical_enter();
3423 freevnodes += vd->freevnodes;
3424 for (i = 0; i < VDBATCH_SIZE; i++) {
3425 vp = vd->tab[i];
3426 TAILQ_REMOVE(&vnode_list, vp, v_vnodelist);
3427 TAILQ_INSERT_TAIL(&vnode_list, vp, v_vnodelist);
3428 MPASS(vp->v_dbatchcpu != NOCPU);
3429 vp->v_dbatchcpu = NOCPU;
3430 }
3431 mtx_unlock(&vnode_list_mtx);
3432 vd->freevnodes = 0;
3433 bzero(vd->tab, sizeof(vd->tab));
3434 vd->index = 0;
3435 critical_exit();
3436}
3437
3438static void
3439vdbatch_enqueue(struct vnode *vp)

Callers 1

vdbatch_enqueueFunction · 0.85

Calls 6

mtx_assertFunction · 0.85
bzeroFunction · 0.85
mtx_lockFunction · 0.70
mtx_unlockFunction · 0.70
critical_enterFunction · 0.50
critical_exitFunction · 0.50

Tested by

no test coverage detected