diff options
author | dyson <dyson@FreeBSD.org> | 1996-06-16 20:37:31 +0000 |
---|---|---|
committer | dyson <dyson@FreeBSD.org> | 1996-06-16 20:37:31 +0000 |
commit | 4e8ccabc814c59d749b8668436e88de78f3c617d (patch) | |
tree | 6b39f5a681da400b6143dac6540e8218547a46e6 /sys/vm/default_pager.c | |
parent | 787546bf1d9334d1251577ad85443d07dd86f971 (diff) | |
download | FreeBSD-src-4e8ccabc814c59d749b8668436e88de78f3c617d.zip FreeBSD-src-4e8ccabc814c59d749b8668436e88de78f3c617d.tar.gz |
Various bugfixes/cleanups from me and others:
1) Remove potential race conditions on waking up in vm_page_free_wakeup
by making sure that it is at splvm().
2) Fix another bug in vm_map_simplify_entry.
3) Be more complete about converting from default to swap pager
when an object grows to be large enough that there can be
a problem with data structure allocation under low memory
conditions.
4) Make some madvise code more efficient.
5) Added some comments.
Diffstat (limited to 'sys/vm/default_pager.c')
-rw-r--r-- | sys/vm/default_pager.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/vm/default_pager.c b/sys/vm/default_pager.c index 9c7acdf..ee477eb 100644 --- a/sys/vm/default_pager.c +++ b/sys/vm/default_pager.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: default_pager.c,v 1.7 1996/05/24 05:14:44 dyson Exp $ + * $Id: default_pager.c,v 1.8 1996/05/29 05:12:23 dyson Exp $ */ #include <sys/param.h> @@ -36,6 +36,7 @@ #include <sys/kernel.h> #include <sys/malloc.h> #include <sys/queue.h> +#include <sys/vmmeter.h> #include <vm/vm.h> #include <vm/vm_param.h> @@ -153,3 +154,15 @@ default_pager_convert_to_swap(object) object->type = OBJT_DEFAULT; } } + +void +default_pager_convert_to_swapq(object) + vm_object_t object; +{ + if (object && + (object->type == OBJT_DEFAULT) && + (object != kernel_object && object != kmem_object) && + (object->size > ((cnt.v_page_count - cnt.v_wire_count) / 4))) + default_pager_convert_to_swap(object); +} + |