diff options
author | dyson <dyson@FreeBSD.org> | 1997-12-29 00:25:11 +0000 |
---|---|---|
committer | dyson <dyson@FreeBSD.org> | 1997-12-29 00:25:11 +0000 |
commit | cd67bb82fe37f70fed8e42c14c818de84029e3c0 (patch) | |
tree | a5d04c1ccd61a23a22dbd5ecd8264d7c3e866024 /sys/vm/vm_page.c | |
parent | f5f5008388092430288cb0018453755be5be7bdb (diff) | |
download | FreeBSD-src-cd67bb82fe37f70fed8e42c14c818de84029e3c0.zip FreeBSD-src-cd67bb82fe37f70fed8e42c14c818de84029e3c0.tar.gz |
Lots of improvements, including restructring the caching and management
of vnodes and objects. There are some metadata performance improvements
that come along with this. There are also a few prototypes added when
the need is noticed. Changes include:
1) Cleaning up vref, vget.
2) Removal of the object cache.
3) Nuke vnode_pager_uncache and friends, because they aren't needed anymore.
4) Correct some missing LK_RETRY's in vn_lock.
5) Correct the page range in the code for msync.
Be gentle, and please give me feedback asap.
Diffstat (limited to 'sys/vm/vm_page.c')
-rw-r--r-- | sys/vm/vm_page.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 5571b70..3b36526 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)vm_page.c 7.4 (Berkeley) 5/7/91 - * $Id: vm_page.c,v 1.82 1997/10/10 18:18:47 phk Exp $ + * $Id: vm_page.c,v 1.83 1997/11/06 08:35:50 dyson Exp $ */ /* @@ -73,6 +73,7 @@ #include <sys/malloc.h> #include <sys/proc.h> #include <sys/vmmeter.h> +#include <sys/vnode.h> #include <vm/vm.h> #include <vm/vm_param.h> @@ -1357,7 +1358,9 @@ again1: vm_page_test_dirty(m); if (m->dirty) { if (m->object->type == OBJT_VNODE) { - vm_object_page_clean(m->object, 0, 0, TRUE, TRUE); + vn_lock(m->object->handle, LK_EXCLUSIVE | LK_RETRY, curproc); + vm_object_page_clean(m->object, 0, 0, TRUE); + VOP_UNLOCK(m->object->handle, 0, curproc); goto again1; } else if (m->object->type == OBJT_SWAP || m->object->type == OBJT_DEFAULT) { @@ -1389,7 +1392,9 @@ again1: vm_page_test_dirty(m); if (m->dirty) { if (m->object->type == OBJT_VNODE) { - vm_object_page_clean(m->object, 0, 0, TRUE, TRUE); + vn_lock(m->object->handle, LK_EXCLUSIVE | LK_RETRY, curproc); + vm_object_page_clean(m->object, 0, 0, TRUE); + VOP_UNLOCK(m->object->handle, 0, curproc); goto again1; } else if (m->object->type == OBJT_SWAP || m->object->type == OBJT_DEFAULT) { |