Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys For the nfs throttling kludge, test against v_tag == VT_...
details: https://anonhg.NetBSD.org/src/rev/b1e65cda1cc4
branches: trunk
changeset: 752650:b1e65cda1cc4
user: pooka <pooka%NetBSD.org@localhost>
date: Tue Mar 02 21:32:29 2010 +0000
description:
For the nfs throttling kludge, test against v_tag == VT_NFS instead
of v_op (the latter imposes linkage).
diffstat:
sys/dev/vnd.c | 10 +++-------
sys/uvm/uvm_swap.c | 12 +++---------
2 files changed, 6 insertions(+), 16 deletions(-)
diffs (79 lines):
diff -r 5605e6133120 -r b1e65cda1cc4 sys/dev/vnd.c
--- a/sys/dev/vnd.c Tue Mar 02 21:17:31 2010 +0000
+++ b/sys/dev/vnd.c Tue Mar 02 21:32:29 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vnd.c,v 1.207 2010/01/31 15:40:08 mlelstv Exp $ */
+/* $NetBSD: vnd.c,v 1.208 2010/03/02 21:32:29 pooka Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
@@ -130,10 +130,9 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.207 2010/01/31 15:40:08 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.208 2010/03/02 21:32:29 pooka Exp $");
#if defined(_KERNEL_OPT)
-#include "fs_nfs.h"
#include "opt_vnd.h"
#endif
@@ -1560,13 +1559,10 @@
static void
vndthrottle(struct vnd_softc *vnd, struct vnode *vp)
{
-#ifdef NFS
- extern int (**nfsv2_vnodeop_p)(void *);
- if (vp->v_op == nfsv2_vnodeop_p)
+ if (vp->v_tag == VT_NFS)
vnd->sc_maxactive = 2;
else
-#endif
vnd->sc_maxactive = 8;
if (vnd->sc_maxactive < 1)
diff -r 5605e6133120 -r b1e65cda1cc4 sys/uvm/uvm_swap.c
--- a/sys/uvm/uvm_swap.c Tue Mar 02 21:17:31 2010 +0000
+++ b/sys/uvm/uvm_swap.c Tue Mar 02 21:32:29 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_swap.c,v 1.149 2010/02/07 15:51:28 mlelstv Exp $ */
+/* $NetBSD: uvm_swap.c,v 1.150 2010/03/02 21:32:29 pooka Exp $ */
/*
* Copyright (c) 1995, 1996, 1997, 2009 Matthew R. Green
@@ -30,9 +30,8 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.149 2010/02/07 15:51:28 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.150 2010/03/02 21:32:29 pooka Exp $");
-#include "fs_nfs.h"
#include "opt_uvmhist.h"
#include "opt_compat_netbsd.h"
#include "opt_ddb.h"
@@ -818,9 +817,6 @@
long addr;
u_long result;
struct vattr va;
-#ifdef NFS
- extern int (**nfsv2_vnodeop_p)(void *);
-#endif /* NFS */
const struct bdevsw *bdev;
dev_t dev;
UVMHIST_FUNC("swap_on"); UVMHIST_CALLED(pdhist);
@@ -877,11 +873,9 @@
* limit the max # of outstanding I/O requests we issue
* at any one time. take it easy on NFS servers.
*/
-#ifdef NFS
- if (vp->v_op == nfsv2_vnodeop_p)
+ if (vp->v_tag == VT_NFS)
sdp->swd_maxactive = 2; /* XXX */
else
-#endif /* NFS */
sdp->swd_maxactive = 8; /* XXX */
break;
Home |
Main Index |
Thread Index |
Old Index