summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>1997-06-03 09:42:43 +0000
committerdfr <dfr@FreeBSD.org>1997-06-03 09:42:43 +0000
commit77f763b0e45aa847de453ff812761ad97045b8d8 (patch)
tree22925659eb5ffa99ecee86aeecc8e09f38713a5c
parent4a116b212612f125b2558e3206cd75761ff0a7d8 (diff)
downloadFreeBSD-src-77f763b0e45aa847de453ff812761ad97045b8d8.zip
FreeBSD-src-77f763b0e45aa847de453ff812761ad97045b8d8.tar.gz
Fix some performance problems with the NFS mmap fixes.
-rw-r--r--sys/kern/vfs_bio.c8
-rw-r--r--sys/nfs/nfs_bio.c8
-rw-r--r--sys/nfsclient/nfs_bio.c8
3 files changed, 14 insertions, 10 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 44ebf79..5a18252 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -18,7 +18,7 @@
* 5. Modifications may be freely made to this file if the above conditions
* are met.
*
- * $Id: vfs_bio.c,v 1.116 1997/05/19 14:36:36 dfr Exp $
+ * $Id: vfs_bio.c,v 1.117 1997/05/30 22:25:35 dfr Exp $
*/
/*
@@ -512,13 +512,17 @@ brelse(struct buf * bp)
* flags in the vm_pages have only DEV_BSIZE resolution but
* the b_validoff, b_validend fields have byte resolution.
* This can avoid unnecessary re-reads of the buffer.
+ * XXX this seems to cause performance problems.
*/
if ((bp->b_flags & B_VMIO)
+#ifdef notdef
&& (bp->b_vp->v_tag != VT_NFS
|| (bp->b_flags & (B_NOCACHE | B_INVAL | B_ERROR))
|| bp->b_validend == 0
|| (bp->b_validoff == 0
- && bp->b_validend == bp->b_bufsize))) {
+ && bp->b_validend == bp->b_bufsize))
+#endif
+ ) {
vm_ooffset_t foff;
vm_object_t obj;
int i, resid;
diff --git a/sys/nfs/nfs_bio.c b/sys/nfs/nfs_bio.c
index 2a02371..a6320b4 100644
--- a/sys/nfs/nfs_bio.c
+++ b/sys/nfs/nfs_bio.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95
- * $Id: nfs_bio.c,v 1.37 1997/05/13 19:41:32 dfr Exp $
+ * $Id: nfs_bio.c,v 1.38 1997/05/19 14:36:47 dfr Exp $
*/
@@ -109,8 +109,8 @@ nfs_getpages(ap)
auio.uio_iov = &aiov;
auio.uio_iovcnt = 1;
aiov.iov_base = 0;
- aiov.iov_len = MAXBSIZE;
- auio.uio_resid = MAXBSIZE;
+ aiov.iov_len = PAGE_SIZE;
+ auio.uio_resid = PAGE_SIZE;
auio.uio_offset = IDX_TO_OFF(m->pindex);
auio.uio_segflg = UIO_NOCOPY;
auio.uio_rw = UIO_READ;
@@ -120,7 +120,7 @@ nfs_getpages(ap)
m->flags |= PG_BUSY;
m->busy--;
- if (error && (auio.uio_resid == MAXBSIZE))
+ if (error && (auio.uio_resid == PAGE_SIZE))
return VM_PAGER_ERROR;
return 0;
}
diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c
index 2a02371..a6320b4 100644
--- a/sys/nfsclient/nfs_bio.c
+++ b/sys/nfsclient/nfs_bio.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95
- * $Id: nfs_bio.c,v 1.37 1997/05/13 19:41:32 dfr Exp $
+ * $Id: nfs_bio.c,v 1.38 1997/05/19 14:36:47 dfr Exp $
*/
@@ -109,8 +109,8 @@ nfs_getpages(ap)
auio.uio_iov = &aiov;
auio.uio_iovcnt = 1;
aiov.iov_base = 0;
- aiov.iov_len = MAXBSIZE;
- auio.uio_resid = MAXBSIZE;
+ aiov.iov_len = PAGE_SIZE;
+ auio.uio_resid = PAGE_SIZE;
auio.uio_offset = IDX_TO_OFF(m->pindex);
auio.uio_segflg = UIO_NOCOPY;
auio.uio_rw = UIO_READ;
@@ -120,7 +120,7 @@ nfs_getpages(ap)
m->flags |= PG_BUSY;
m->busy--;
- if (error && (auio.uio_resid == MAXBSIZE))
+ if (error && (auio.uio_resid == PAGE_SIZE))
return VM_PAGER_ERROR;
return 0;
}
OpenPOWER on IntegriCloud