diff options
author | attilio <attilio@FreeBSD.org> | 2007-05-31 22:52:15 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2007-05-31 22:52:15 +0000 |
commit | 7dd8ed88a925a943f1963baa072f4b6c6a8c9930 (patch) | |
tree | 10bf0f11ceeb18c6b03947eb85223abbbbf9cc67 /sys/vm/vnode_pager.c | |
parent | 4681b4098bbf12784d009826b2223ace96a2306b (diff) | |
download | FreeBSD-src-7dd8ed88a925a943f1963baa072f4b6c6a8c9930.zip FreeBSD-src-7dd8ed88a925a943f1963baa072f4b6c6a8c9930.tar.gz |
Revert VMCNT_* operations introduction.
Probabilly, a general approach is not the better solution here, so we should
solve the sched_lock protection problems separately.
Requested by: alc
Approved by: jeff (mentor)
Diffstat (limited to 'sys/vm/vnode_pager.c')
-rw-r--r-- | sys/vm/vnode_pager.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index 837aa46..cb4cc39 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -728,8 +728,8 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage) if (i != reqpage) vm_page_free(m[i]); vm_page_unlock_queues(); - VMCNT_ADD(vnodein, 1); - VMCNT_ADD(vnodepgsin, 1); + cnt.v_vnodein++; + cnt.v_vnodepgsin++; error = vnode_pager_input_old(object, m[reqpage]); VM_OBJECT_UNLOCK(object); return (error); @@ -757,8 +757,8 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage) vm_page_free(m[i]); vm_page_unlock_queues(); VM_OBJECT_UNLOCK(object); - VMCNT_ADD(vnodein, 1); - VMCNT_ADD(vnodepgsin, 1); + cnt.v_vnodein++; + cnt.v_vnodepgsin++; return vnode_pager_input_smlfs(object, m[reqpage]); } @@ -909,8 +909,8 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage) bp->b_runningbufspace = bp->b_bufsize; atomic_add_int(&runningbufspace, bp->b_runningbufspace); - VMCNT_ADD(vnodein, 1); - VMCNT_ADD(vnodepgsin, 1); + cnt.v_vnodein++; + cnt.v_vnodepgsin += count; /* do the input */ bp->b_iooffset = dbtob(bp->b_blkno); @@ -1031,8 +1031,7 @@ vnode_pager_putpages(object, m, count, sync, rtvals) * daemon up. This should be probably be addressed XXX. */ - if ((VMCNT_GET(free_count) + VMCNT_GET(cache_count)) < - VMCNT_GET(pageout_free_min)) + if ((cnt.v_free_count + cnt.v_cache_count) < cnt.v_pageout_free_min) sync |= OBJPC_SYNC; /* @@ -1158,8 +1157,8 @@ vnode_pager_generic_putpages(vp, m, bytecount, flags, rtvals) auio.uio_resid = maxsize; auio.uio_td = (struct thread *) 0; error = VOP_WRITE(vp, &auio, ioflags, curthread->td_ucred); - VMCNT_ADD(vnodein, 1); - VMCNT_ADD(vnodepgsin, ncount); + cnt.v_vnodeout++; + cnt.v_vnodepgsout += ncount; if (error) { if ((ppscheck = ppsratecheck(&lastfail, &curfail, 1))) |