aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitrij Tejblum <dt@FreeBSD.org>1998-12-29 22:53:51 +0000
committerDmitrij Tejblum <dt@FreeBSD.org>1998-12-29 22:53:51 +0000
commit7a917245568173d0095d8bfc2db89e254bc4e58e (patch)
tree6358e4b101a3b826eba2d88c60eef723d4954065
parent9300774d7e6ff06dffb0b48094e85fcae65b5eab (diff)
downloadsrc-7a917245568173d0095d8bfc2db89e254bc4e58e.tar.gz
src-7a917245568173d0095d8bfc2db89e254bc4e58e.zip
Don't free swap in swap_pager_getpages(): this code probably cause the
"dying daemons" problem. (I thought this code was introduced in rev.1.80, but it just relaxed the condition.) Also, kill related "suggest more swap space" warning (also introduced in 1.80). It was confusing, to say the least... Requested by: msmith Not objected by: dg
Notes
Notes: svn path=/head/; revision=42153
-rw-r--r--sys/vm/swap_pager.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c
index 62733c9b1d84..3e2d0de9534e 100644
--- a/sys/vm/swap_pager.c
+++ b/sys/vm/swap_pager.c
@@ -39,7 +39,7 @@
* from: Utah $Hdr: swap_pager.c 1.4 91/04/30$
*
* @(#)swap_pager.c 8.9 (Berkeley) 3/21/94
- * $Id: swap_pager.c,v 1.103 1998/10/31 15:31:28 peter Exp $
+ * $Id: swap_pager.c,v 1.104 1998/11/19 06:20:42 bde Exp $
*/
/*
@@ -81,7 +81,6 @@
static int nswiodone;
int swap_pager_full;
extern int vm_swap_size;
-static int suggest_more_swap = 0;
static int no_swap_space = 1;
static int max_pageout_cluster;
struct rlisthdr swaplist;
@@ -398,11 +397,6 @@ swap_pager_getswapspace(object, amount, rtval)
unsigned location;
vm_swap_size -= amount;
- if (!suggest_more_swap && (vm_swap_size < btodb(cnt.v_page_count * PAGE_SIZE))) {
- printf("swap_pager: suggest more swap space: %d MB\n",
- (2 * cnt.v_page_count * (PAGE_SIZE / 1024)) / 1000);
- suggest_more_swap = 1;
- }
if (!rlist_alloc(&swaplist, amount, &location)) {
vm_swap_size += amount;
@@ -1128,22 +1122,6 @@ swap_pager_getpages(object, m, count, reqpage)
}
m[reqpage]->object->last_read = m[count-1]->pindex;
-
- /*
- * If we're out of swap space, then attempt to free
- * some whenever multiple pages are brought in. We
- * must set the dirty bits so that the page contents
- * will be preserved.
- */
- if (SWAPLOW ||
- (vm_swap_size < btodb((cnt.v_page_count - cnt.v_wire_count)) * PAGE_SIZE)) {
- for (i = 0; i < count; i++) {
- m[i]->dirty = VM_PAGE_BITS_ALL;
- }
- swap_pager_freespace(object,
- m[0]->pindex + paging_offset, count);
- }
-
} else {
swap_pager_ridpages(m, count, reqpage);
}