summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_swap.c
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1998-02-23 08:22:48 +0000
committerdyson <dyson@FreeBSD.org>1998-02-23 08:22:48 +0000
commitc4e82fbab0e2810b076cfdd1462d5c086e1c442b (patch)
tree32edadf5a10589c683a222e603fe1062a64fbfb1 /sys/vm/vm_swap.c
parentb77de226503076b55efebae9b92333cd8c2535d9 (diff)
downloadFreeBSD-src-c4e82fbab0e2810b076cfdd1462d5c086e1c442b.zip
FreeBSD-src-c4e82fbab0e2810b076cfdd1462d5c086e1c442b.tar.gz
Significantly improve the efficiency of the swap pager, which appears to
have declined due to code-rot over time. The swap pager rundown code has been clean-up, and unneeded wakeups removed. Lots of splbio's are changed to splvm's. Also, set the dynamic tunables for the pageout daemon to be more sane for larger systems (thereby decreasing the daemon overheadla.)
Diffstat (limited to 'sys/vm/vm_swap.c')
-rw-r--r--sys/vm/vm_swap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/vm/vm_swap.c b/sys/vm/vm_swap.c
index 84fb5d2..48e6aa6 100644
--- a/sys/vm/vm_swap.c
+++ b/sys/vm/vm_swap.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)vm_swap.c 8.5 (Berkeley) 2/17/94
- * $Id: vm_swap.c,v 1.51 1998/01/25 04:13:25 eivind Exp $
+ * $Id: vm_swap.c,v 1.52 1998/02/19 12:15:06 msmith Exp $
*/
#include "opt_devfs.h"
@@ -105,7 +105,7 @@ static void
swstrategy(bp)
register struct buf *bp;
{
- int sz, off, seg, index;
+ int s, sz, off, seg, index;
register struct swdevt *sp;
struct vnode *vp;
@@ -139,6 +139,7 @@ swstrategy(bp)
return;
}
vhold(sp->sw_vp);
+ s = splvm();
if ((bp->b_flags & B_READ) == 0) {
vp = bp->b_vp;
if (vp) {
@@ -152,6 +153,7 @@ swstrategy(bp)
}
if (bp->b_vp != NULL)
pbrelvp(bp);
+ splx(s);
bp->b_vp = sp->sw_vp;
VOP_STRATEGY(bp);
}
OpenPOWER on IntegriCloud