Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.3.48 /mm/page_alloc.c

Filename:/mm/page_alloc.c
Lines Added:15
Lines Deleted:11
Also changed in: (Previous) 2.3.47  2.3.44  2.3.43  2.3.41  2.3.38  2.3.32 
(Following) 2.3.49  2.3.50  2.3.99-pre1  2.3.99-pre2  2.3.99-pre3  2.3.99-pre4 

Location
[  2.3.48
  [  mm
     o  page_alloc.c

Patch

diff -u --recursive --new-file v2.3.47/linux/mm/page_alloc.c linux/mm/page_alloc.c
--- v2.3.47/linux/mm/page_alloc.c   Sun Feb 20 21:12:40 2000
+++ linux/mm/page_alloc.c   Sat Feb 26 20:50:34 2000
@@ -27,6 +27,7 @@
 int nr_swap_pages = 0;
 int nr_lru_pages;
 LIST_HEAD(lru_cache);
+pg_data_t *pgdat_list = (pg_data_t *)0;
 
 static char *zone_names[MAX_NR_ZONES] = { "DMA", "Normal", "HighMem" };
 static int zone_balance_ratio[MAX_NR_ZONES] = { 128, 128, 128, };
@@ -264,24 +265,23 @@
          {
             if (z->low_on_memory)
                z->low_on_memory = 0;
+            z->zone_wake_kswapd = 0;
          }
          else
          {
             extern wait_queue_head_t kswapd_wait;
 
-            if (z->low_on_memory)
-               goto balance;
-
-            if (free <= z->pages_low)
-            {
+            if (free <= z->pages_low) {
+               z->zone_wake_kswapd = 1;
                wake_up_interruptible(&kswapd_wait);
+            } else
+               z->zone_wake_kswapd = 0;
 
-               if (free <= z->pages_min)
-               {
-                  z->low_on_memory = 1;
-                  goto balance;
-               }
-            }
+            if (free <= z->pages_min)
+               z->low_on_memory = 1;
+
+            if (z->low_on_memory)
+               goto balance;
          }
       }
       /*
@@ -482,6 +482,9 @@
    unsigned long totalpages, offset;
    unsigned int cumulative = 0;
 
+   pgdat->node_next = pgdat_list;
+   pgdat_list = pgdat;
+
    totalpages = 0;
    for (i = 0; i < MAX_NR_ZONES; i++) {
       unsigned long size = zones_size[i];
@@ -560,6 +563,7 @@
       zone->pages_low = mask*2;
       zone->pages_high = mask*3;
       zone->low_on_memory = 0;
+      zone->zone_wake_kswapd = 0;
       zone->zone_mem_map = mem_map + offset;
       zone->zone_start_mapnr = offset;
       zone->zone_start_paddr = zone_start_paddr;


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.