Re: 2.1.91pre2 stable?

Garst R. Reese (reese@isn.net)
Fri, 27 Mar 1998 10:45:33 -0400


Rik van Riel <H.H.vanRiel@fys.ruu.nl> wrote:
Date: Fri, 27 Mar 1998 08:04:14 +0100 (MET)

--------------------------------------------------------------

There's still one problem left... When both buffer and cache
are at their minimum value they:
- - won't be swapped out any more (OK)
- - are quite capable of blocking kswapd because they occupy a
page in every 128 area (NOT OK)

This causes kswapd to keep swapping out data pages, of course
to no avail...
The 'solution' (read: quick fix) is to limit the maximum number
of free pages to num_physpages/4...
My guess is that this is only needed for small (<32M) machines.

Rik.

--- vmscan.c~ Fri Mar 27 07:14:34 1998
+++ vmscan.c Fri Mar 27 07:14:34 1998
@@ -576,6 +576,8 @@

if (++tried > SWAP_CLUSTER_MAX &&
free_memory_available(0))
break;
+ if (nr_free_pages > num_physpages >> 2)
+ break;
gfp_mask = __GFP_IO;
try_to_free_page(gfp_mask);
/*
-------------------------------------------------------------
Rik, you also posted the following patch along with another one to
vmscan.c and swap.h, but this part did not make it into 2.1.91. Was that
intentional?

--- ./mm/page_alloc.c.pre91-2 Thu Mar 26 12:07:00 1998
+++ ./mm/page_alloc.c Thu Mar 26 14:26:59 1998
@@ -282,8 +282,11 @@
spin_lock_irqsave(&page_alloc_lock, flags);
RMQUEUE(order, maxorder, (gfp_mask & GFP_DMA));
spin_unlock_irqrestore(&page_alloc_lock, flags);
- if ((gfp_mask & __GFP_WAIT) && try_to_free_page(gfp_mask))
+ /* No free pages? Let's free some... */
+ if ((gfp_mask & __GFP_WAIT) && try_to_free_pages((gfp_mask &
~__GFP_WAIT),SWAP_CLUSTER_MAX)) {
+ run_task_queue(&tq_disk);
goto repeat;
+ }
nopage:
return 0;
}

-- 
Garst

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu