patch-2.2.0-pre6 linux/mm/page_alloc.c
Next file: linux/mm/vmscan.c
Previous file: linux/kernel/fork.c
Back to the patch index
Back to the overall index
- Lines: 19
- Date:
Fri Jan 8 15:34:32 1999
- Orig file:
v2.2.0-pre5/linux/mm/page_alloc.c
- Orig date:
Thu Jan 7 15:11:41 1999
diff -u --recursive --new-file v2.2.0-pre5/linux/mm/page_alloc.c linux/mm/page_alloc.c
@@ -258,9 +258,6 @@
* a bad memory situation, we're better off trying
* to free things up until things are better.
*
- * Normally we shouldn't ever have to do this, with
- * kswapd doing this in the background.
- *
* Most notably, this puts most of the onus of
* freeing up memory on the processes that _use_
* the most memory, rather than on everybody.
@@ -282,7 +279,7 @@
{
int freed;
current->flags |= PF_MEMALLOC;
- freed = try_to_free_pages(gfp_mask, SWAP_CLUSTER_MAX);
+ freed = try_to_free_pages(gfp_mask, freepages.high - nr_free_pages);
current->flags &= ~PF_MEMALLOC;
if (!freed && !(gfp_mask & (__GFP_MED | __GFP_HIGH)))
goto nopage;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov