diff options
author | ps <ps@FreeBSD.org> | 2005-11-01 23:00:24 +0000 |
---|---|---|
committer | ps <ps@FreeBSD.org> | 2005-11-01 23:00:24 +0000 |
commit | c171de528f0e40dee7cd48c47f299881e185f299 (patch) | |
tree | 9f7c2b10da0b55a81cb1cbe8c5e6a42095f0dc40 /sys | |
parent | ceb69258da253fb0e8c5f021b7aa0a0cd54fab5f (diff) | |
download | FreeBSD-src-c171de528f0e40dee7cd48c47f299881e185f299.zip FreeBSD-src-c171de528f0e40dee7cd48c47f299881e185f299.tar.gz |
Rate limit vnode_pager_putpages printfs to once a second.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vm/vnode_pager.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index 703f967..e6ac5bb 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -1061,6 +1061,9 @@ vnode_pager_generic_putpages(vp, m, bytecount, flags, rtvals) struct iovec aiov; int error; int ioflags; + int ppscheck = 0; + static struct timeval lastfail; + static int curfail; object = vp->v_object; count = bytecount / PAGE_SIZE; @@ -1144,11 +1147,13 @@ vnode_pager_generic_putpages(vp, m, bytecount, flags, rtvals) cnt.v_vnodepgsout += ncount; if (error) { - printf("vnode_pager_putpages: I/O error %d\n", error); + if ((ppscheck = ppsratecheck(&lastfail, &curfail, 1))) + printf("vnode_pager_putpages: I/O error %d\n", error); } if (auio.uio_resid) { - printf("vnode_pager_putpages: residual I/O %d at %lu\n", - auio.uio_resid, (u_long)m[0]->pindex); + if (ppscheck || ppsratecheck(&lastfail, &curfail, 1)) + printf("vnode_pager_putpages: residual I/O %d at %lu\n", + auio.uio_resid, (u_long)m[0]->pindex); } for (i = 0; i < ncount; i++) { rtvals[i] = VM_PAGER_OK; |