patch-2.0.32 linux/mm/vmscan.c
Next file: linux/net/core/sock.c
Previous file: linux/mm/page_alloc.c
Back to the patch index
Back to the overall index
- Lines: 35
- Date:
Fri Nov 7 09:57:31 1997
- Orig file:
v2.0.31/linux/mm/vmscan.c
- Orig date:
Tue Sep 23 13:23:33 1997
diff -u --recursive --new-file v2.0.31/linux/mm/vmscan.c linux/mm/vmscan.c
@@ -406,7 +406,7 @@
can_do_io = 1;
if (wait)
stop = 0;
- if (priority == GFP_BUFFER)
+ if (priority == GFP_IO)
can_do_io = 0;
switch (state) {
do {
@@ -453,7 +453,7 @@
*/
int kswapd(void *unused)
{
- int i;
+ int i, j;
current->session = 1;
current->pgrp = 1;
@@ -491,12 +491,12 @@
swapstats.wakeups++;
/* Protect our reserved pages: */
i = 0;
- if (nr_free_pages <= min_free_pages)
- i = (1+min_free_pages) - nr_free_pages;
+ j = (min_free_pages >= 48 ? min_free_pages-12 : min_free_pages);
+ if (nr_free_pages <= j)
+ i = (1+j) - nr_free_pages;
/* Do the background pageout: */
for (i += kswapd_ctl.maxpages; i > 0; i--)
- try_to_free_page(GFP_KERNEL, 0,
- (nr_free_pages <= min_free_pages));
+ try_to_free_page(GFP_KERNEL, 0, (nr_free_pages <= j));
}
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov