summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/syscall/rw.c
diff options
context:
space:
mode:
authormaybee <none@none>2006-07-18 18:09:14 -0700
committermaybee <none@none>2006-07-18 18:09:14 -0700
commit13506d1eefbbc37e2f12a0528831d9f6d4c361d7 (patch)
tree2d671d0dd6124ab6c7653af1af4d94c468df0388 /usr/src/uts/common/syscall/rw.c
parent97669b901409b5fd29dd43e8a2ee1d17564ca0dc (diff)
downloadillumos-joyent-13506d1eefbbc37e2f12a0528831d9f6d4c361d7.tar.gz
6447377 ZFS prefetch is inconsistant
Diffstat (limited to 'usr/src/uts/common/syscall/rw.c')
-rw-r--r--usr/src/uts/common/syscall/rw.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/usr/src/uts/common/syscall/rw.c b/usr/src/uts/common/syscall/rw.c
index a7b5ce6b9d..3eb98b50ac 100644
--- a/usr/src/uts/common/syscall/rw.c
+++ b/usr/src/uts/common/syscall/rw.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -52,9 +51,9 @@
#include <sys/rctl.h>
#include <sys/nbmlock.h>
-#define COPYOUT_MIN_SIZE (1<<17) /* 128K */
+#define COPYOUT_MAX_CACHE (1<<17) /* 128K */
-static size_t copyout_min_size = COPYOUT_MIN_SIZE;
+size_t copyout_max_cached = COPYOUT_MAX_CACHE; /* global so it's patchable */
/*
* read, write, pread, pwrite, readv, and writev syscalls.
@@ -167,7 +166,7 @@ read(int fdes, void *cbuf, size_t count)
/*
* Only use bypass caches when the count is large enough
*/
- if (bcount < copyout_min_size)
+ if (bcount <= copyout_max_cached)
auio.uio_extflg = UIO_COPY_CACHED;
else
auio.uio_extflg = UIO_COPY_DEFAULT;
@@ -723,7 +722,7 @@ readv(int fdes, struct iovec *iovp, int iovcnt)
auio.uio_segflg = UIO_USERSPACE;
auio.uio_llimit = MAXOFFSET_T;
auio.uio_fmode = fflag;
- if (bcount < copyout_min_size)
+ if (bcount <= copyout_max_cached)
auio.uio_extflg = UIO_COPY_CACHED;
else
auio.uio_extflg = UIO_COPY_DEFAULT;