MFC rev 1.222:

Use atomic operations on runningbufspace.

 PR:             kern/84318
 Submitted by:   ade

Approved by:	re (kensmith)
This commit is contained in:
ssouhlal 2005-08-15 06:22:09 +00:00
parent 7567e889d8
commit 871d11a963

View File

@ -65,6 +65,8 @@ __FBSDID("$FreeBSD$");
#include <sys/conf.h>
#include <sys/sf_buf.h>
#include <machine/atomic.h>
#include <vm/vm.h>
#include <vm/vm_object.h>
#include <vm/vm_page.h>
@ -546,7 +548,7 @@ vnode_pager_input_smlfs(object, m)
bp->b_bcount = bsize;
bp->b_bufsize = bsize;
bp->b_runningbufspace = bp->b_bufsize;
runningbufspace += bp->b_runningbufspace;
atomic_add_int(&runningbufspace, bp->b_runningbufspace);
/* do the input */
bp->b_iooffset = dbtob(bp->b_blkno);
@ -898,7 +900,7 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage)
bp->b_bcount = size;
bp->b_bufsize = size;
bp->b_runningbufspace = bp->b_bufsize;
runningbufspace += bp->b_runningbufspace;
atomic_add_int(&runningbufspace, bp->b_runningbufspace);
cnt.v_vnodein++;
cnt.v_vnodepgsin += count;