patch-2.3.38 linux/mm/page_alloc.c
Next file: linux/mm/slab.c
Previous file: linux/mm/highmem.c
Back to the patch index
Back to the overall index
- Lines: 57
- Date:
Thu Jan 6 16:21:23 2000
- Orig file:
v2.3.37/linux/mm/page_alloc.c
- Orig date:
Tue Dec 14 01:27:24 1999
diff -u --recursive --new-file v2.3.37/linux/mm/page_alloc.c linux/mm/page_alloc.c
@@ -224,7 +224,7 @@
return 1;
current->flags |= PF_MEMALLOC;
- freed = try_to_free_pages(gfp_mask);
+ freed = try_to_free_pages(gfp_mask, zone);
current->flags &= ~PF_MEMALLOC;
if (!freed && !(gfp_mask & (__GFP_MED | __GFP_HIGH)))
@@ -235,7 +235,7 @@
/*
* We are still balancing memory in a global way:
*/
-static inline int balance_memory (int gfp_mask)
+static inline int balance_memory (zone_t *zone, int gfp_mask)
{
unsigned long free = nr_free_pages();
static int low_on_memory = 0;
@@ -264,7 +264,7 @@
return 1;
current->flags |= PF_MEMALLOC;
- freed = try_to_free_pages(gfp_mask);
+ freed = try_to_free_pages(gfp_mask, zone);
current->flags &= ~PF_MEMALLOC;
if (!freed && !(gfp_mask & (__GFP_MED | __GFP_HIGH)))
@@ -340,7 +340,7 @@
* The main chunk of the balancing code is in this offline branch:
*/
balance:
- if (!balance_memory(gfp_mask))
+ if (!balance_memory(z, gfp_mask))
goto nopage;
goto ready;
}
@@ -533,9 +533,9 @@
i = 10;
if (i > 256)
i = 256;
- freepages.min = i;
- freepages.low = i * 2;
- freepages.high = i * 3;
+ freepages.min += i;
+ freepages.low += i * 2;
+ freepages.high += i * 3;
/*
* Some architectures (with lots of mem and discontinous memory
@@ -574,6 +574,7 @@
zone->size = size;
zone->name = zone_names[j];
zone->lock = SPIN_LOCK_UNLOCKED;
+ zone->zone_pgdat = pgdat;
if (!size)
continue;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)