diff options
author | 2001-12-06 12:43:20 +0000 | |
---|---|---|
committer | 2001-12-06 12:43:20 +0000 | |
commit | 1443287ebab55bb1a0499dead547daa3068865eb (patch) | |
tree | d0fb2cca2c5fcfd20f6bcaeff16701d0b9308542 /sys/uvm/uvm_vnode.c | |
parent | oops, local change escaped (diff) | |
download | wireguard-openbsd-1443287ebab55bb1a0499dead547daa3068865eb.tar.xz wireguard-openbsd-1443287ebab55bb1a0499dead547daa3068865eb.zip |
Keep track of how many pages a vnode hold with vhold and vholdrele
so that we can get back the old behavior where a vnode with cached data
is less likely to be recycled than a vnode without cached data.
XXX - This is a brute-force solution - we do it where uvmexp.vnodepages
are changed, I am not really sure it is correct but people have been
very happy with the diff so far and want this in the tree.
Diffstat (limited to 'sys/uvm/uvm_vnode.c')
-rw-r--r-- | sys/uvm/uvm_vnode.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/uvm/uvm_vnode.c b/sys/uvm/uvm_vnode.c index 180acc16e66..67ccf7d605c 100644 --- a/sys/uvm/uvm_vnode.c +++ b/sys/uvm/uvm_vnode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_vnode.c,v 1.29 2001/12/04 23:22:42 art Exp $ */ +/* $OpenBSD: uvm_vnode.c,v 1.30 2001/12/06 12:43:20 art Exp $ */ /* $NetBSD: uvm_vnode.c,v 1.51 2001/08/17 05:53:02 chs Exp $ */ /* @@ -899,6 +899,7 @@ uvn_findpage(uobj, offset, pgp, flags) int flags; { struct vm_page *pg; + int s; UVMHIST_FUNC("uvn_findpage"); UVMHIST_CALLED(ubchist); UVMHIST_LOG(ubchist, "vp %p off 0x%lx", uobj, offset,0,0); @@ -932,6 +933,9 @@ uvn_findpage(uobj, offset, pgp, flags) } else { uvmexp.vnodepages++; } + s = splbio(); + vhold((struct vnode *)uobj); + splx(s); UVMHIST_LOG(ubchist, "alloced",0,0,0,0); break; } else if (flags & UFP_NOCACHE) { |