summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2007-05-18 07:10:50 +0000
committerjeff <jeff@FreeBSD.org>2007-05-18 07:10:50 +0000
commite1996cb9609d2e55a26ee78dddbfce4ba4073b53 (patch)
treec94b660d4b9246fed8cbeadf7851932258d8b72a /sys/nfsclient
parentbeb495eff1db0646624feb7071ced7f632ff8869 (diff)
downloadFreeBSD-src-e1996cb9609d2e55a26ee78dddbfce4ba4073b53.zip
FreeBSD-src-e1996cb9609d2e55a26ee78dddbfce4ba4073b53.tar.gz
- define and use VMCNT_{GET,SET,ADD,SUB,PTR} macros for manipulating
vmcnts. This can be used to abstract away pcpu details but also changes to use atomics for all counters now. This means sched lock is no longer responsible for protecting counts in the switch routines. Contributed by: Attilio Rao <attilio@FreeBSD.org>
Diffstat (limited to 'sys/nfsclient')
-rw-r--r--sys/nfsclient/nfs_bio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c
index e42a356..38bc475 100644
--- a/sys/nfsclient/nfs_bio.c
+++ b/sys/nfsclient/nfs_bio.c
@@ -159,8 +159,8 @@ nfs_getpages(struct vop_getpages_args *ap)
kva = (vm_offset_t) bp->b_data;
pmap_qenter(kva, pages, npages);
- cnt.v_vnodein++;
- cnt.v_vnodepgsin += npages;
+ VMCNT_ADD(vnodein, 1);
+ VMCNT_ADD(vnodepgsin, npages);
iov.iov_base = (caddr_t) kva;
iov.iov_len = count;
@@ -323,8 +323,8 @@ nfs_putpages(struct vop_putpages_args *ap)
kva = (vm_offset_t) bp->b_data;
pmap_qenter(kva, pages, npages);
- cnt.v_vnodeout++;
- cnt.v_vnodepgsout += count;
+ VMCNT_ADD(vnodeout, 1);
+ VMCNT_ADD(vnodepgsout, count);
iov.iov_base = (caddr_t) kva;
iov.iov_len = count;
OpenPOWER on IntegriCloud