diff options
author | jhb <jhb@FreeBSD.org> | 2001-07-04 19:55:01 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-07-04 19:55:01 +0000 |
commit | ff7f1b3c5b9b8b169bed580ff2031aa18f461be1 (patch) | |
tree | 89f98d5ea581383e4a48ad8dc21dec0d4604abf3 /sys/fs/smbfs | |
parent | cbc4469f380c9b6048e2bf51422384c0696d3a12 (diff) | |
download | FreeBSD-src-ff7f1b3c5b9b8b169bed580ff2031aa18f461be1.zip FreeBSD-src-ff7f1b3c5b9b8b169bed580ff2031aa18f461be1.tar.gz |
- Update the vmmeter statistics for vnode pageins and pageouts in
getpages/putpages.
- Use vm_page_undirty() instead of messing with pages' dirty fields
directly.
Diffstat (limited to 'sys/fs/smbfs')
-rw-r--r-- | sys/fs/smbfs/smbfs_io.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/fs/smbfs/smbfs_io.c b/sys/fs/smbfs/smbfs_io.c index 1033e8e..505c906 100644 --- a/sys/fs/smbfs/smbfs_io.c +++ b/sys/fs/smbfs/smbfs_io.c @@ -46,6 +46,7 @@ #include <sys/dirent.h> #include <sys/signalvar.h> #include <sys/sysctl.h> +#include <sys/vmmeter.h> #include <vm/vm.h> #if __FreeBSD_version < 400000 @@ -444,6 +445,8 @@ smbfs_getpages(ap) npages = btoc(count); kva = (vm_offset_t) bp->b_data; pmap_qenter(kva, pages, npages); + cnt.v_vnodein++; + cnt.v_vnodepgsin += count; iov.iov_base = (caddr_t) kva; iov.iov_len = count; @@ -484,7 +487,7 @@ smbfs_getpages(ap) if (nextoff <= size) { m->valid = VM_PAGE_BITS_ALL; - m->dirty = 0; + vm_page_undirty(m); } else { int nvalid = ((size + DEV_BSIZE - 1) - toff) & ~(DEV_BSIZE - 1); vm_page_set_validclean(m, 0, nvalid); @@ -580,6 +583,8 @@ smbfs_putpages(ap) #endif kva = (vm_offset_t) bp->b_data; pmap_qenter(kva, pages, npages); + cnt.v_vnodeout++; + cnt.v_vnodepgsout += count; iov.iov_base = (caddr_t) kva; iov.iov_len = count; @@ -608,7 +613,7 @@ smbfs_putpages(ap) int nwritten = round_page(count - uio.uio_resid) / PAGE_SIZE; for (i = 0; i < nwritten; i++) { rtvals[i] = VM_PAGER_OK; - pages[i]->dirty = 0; + vm_page_undirty(pages[i]); } } return rtvals[0]; |