Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev When reading or writing the backing store us POSIX_F...
details: https://anonhg.NetBSD.org/src/rev/e2d1795d1e5f
branches: trunk
changeset: 766391:e2d1795d1e5f
user: hannken <hannken%NetBSD.org@localhost>
date: Tue Jun 21 12:41:24 2011 +0000
description:
When reading or writing the backing store us POSIX_FADV_NOREUSE access hint
to prevent read ahead.
diffstat:
sys/dev/fss.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (34 lines):
diff -r 685f54c00938 -r e2d1795d1e5f sys/dev/fss.c
--- a/sys/dev/fss.c Tue Jun 21 12:38:27 2011 +0000
+++ b/sys/dev/fss.c Tue Jun 21 12:41:24 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fss.c,v 1.75 2011/06/12 03:35:51 rmind Exp $ */
+/* $NetBSD: fss.c,v 1.76 2011/06/21 12:41:24 hannken Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.75 2011/06/12 03:35:51 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.76 2011/06/21 12:41:24 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -978,12 +978,13 @@
vn_lock(sc->sc_bs_vp, LK_EXCLUSIVE|LK_RETRY);
error = vn_rdwr((rw == FSS_READ ? UIO_READ : UIO_WRITE), sc->sc_bs_vp,
- data, len, off, UIO_SYSSPACE, IO_UNIT|IO_NODELOCKED,
+ data, len, off, UIO_SYSSPACE,
+ IO_ADV_ENCODE(POSIX_FADV_NOREUSE) | IO_NODELOCKED,
sc->sc_bs_lwp->l_cred, NULL, NULL);
if (error == 0) {
mutex_enter(sc->sc_bs_vp->v_interlock);
error = VOP_PUTPAGES(sc->sc_bs_vp, trunc_page(off),
- round_page(off+len), PGO_CLEANIT|PGO_SYNCIO|PGO_FREE);
+ round_page(off+len), PGO_CLEANIT | PGO_FREE | PGO_SYNCIO);
}
VOP_UNLOCK(sc->sc_bs_vp);
Home |
Main Index |
Thread Index |
Old Index