diff options
author | dyson <dyson@FreeBSD.org> | 1997-04-13 03:33:25 +0000 |
---|---|---|
committer | dyson <dyson@FreeBSD.org> | 1997-04-13 03:33:25 +0000 |
commit | 786ce6b2bc53ba001cbb502de3abbe55b284d889 (patch) | |
tree | fe8e56e2dc00532b556dbf96c3d7c862258ce002 /sys | |
parent | 9787a73582c593a751051fb91e926b439b8ff436 (diff) | |
download | FreeBSD-src-786ce6b2bc53ba001cbb502de3abbe55b284d889.zip FreeBSD-src-786ce6b2bc53ba001cbb502de3abbe55b284d889.tar.gz |
Improve the buffer cache memory policy by moving pages over to the
cache queue more often. The pageout daemon had to be waken up
more often than necessary since pages were not put on the
cache queue, when they should have been.
Submitted by: David Greenman <dg@freebsd.org>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_bio.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 6eb2404..28d8393 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -18,7 +18,7 @@ * 5. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: vfs_bio.c,v 1.112 1997/02/22 09:39:30 peter Exp $ + * $Id: vfs_bio.c,v 1.113 1997/04/01 08:38:53 bde Exp $ */ /* @@ -694,16 +694,19 @@ vfs_vmio_release(bp) /* * If this is an async free -- we cannot place - * pages onto the cache queue, so our policy for - * such buffers is to avoid the cache queue, and - * only modify the active queue or free queue. + * pages onto the cache queue. If it is an + * async free, then we don't modify any queues. + * This is probably in error (for perf reasons), + * and we will eventually need to build + * a more complete infrastructure to support I/O + * rundown. */ if ((bp->b_flags & B_ASYNC) == 0) { /* * In the case of sync buffer frees, we can do pretty much * anything to any of the memory queues. Specifically, - * the cache queue is free to be modified. + * the cache queue is okay to be modified. */ if (m->valid) { if(m->dirty == 0) @@ -711,14 +714,10 @@ vfs_vmio_release(bp) /* * this keeps pressure off of the process memory */ - if ((vm_swap_size == 0) || - (cnt.v_free_count < cnt.v_free_min)) { - if ((m->dirty == 0) && - (m->hold_count == 0)) - vm_page_cache(m); - else - vm_page_deactivate(m); - } + if (m->dirty == 0 && m->hold_count == 0) + vm_page_cache(m); + else + vm_page_deactivate(m); } else if (m->hold_count == 0) { vm_page_protect(m, VM_PROT_NONE); vm_page_free(m); |