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

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

Advertisement

Kernel v2.6.24 /mm/quicklist.c

Filename:/mm/quicklist.c
Lines Added:10
Lines Deleted:2
Also changed in: (Previous) 2.6.24-rc8  2.6.24-rc7-git8  2.6.24-rc7-git7  2.6.24-rc7-git6  2.6.22  2.6.22-rc7 
(Following) 2.6.27-rc5-git4  2.6.27-rc5-git5  2.6.27-rc5-git6  2.6.27-rc5-git7  2.6.27-rc5-git8  2.6.27-rc5-git9 

Location
[  2.6.24
  [  mm
     o  quicklist.c

Patch

diff --git a/mm/quicklist.c b/mm/quicklist.c
index ae8189c..3f703f7 100644
--- a/mm/quicklist.c
+++ b/mm/quicklist.c
@@ -26,9 +26,17 @@ DEFINE_PER_CPU(struct quicklist, quicklist)[CONFIG_NR_QUICK];
 static unsigned long max_pages(unsigned long min_pages)
 {
    unsigned long node_free_pages, max;
+   struct zone *zones = NODE_DATA(numa_node_id())->node_zones;
+
+   node_free_pages =
+#ifdef CONFIG_ZONE_DMA
+      zone_page_state(&zones[ZONE_DMA], NR_FREE_PAGES) +
+#endif
+#ifdef CONFIG_ZONE_DMA32
+      zone_page_state(&zones[ZONE_DMA32], NR_FREE_PAGES) +
+#endif
+      zone_page_state(&zones[ZONE_NORMAL], NR_FREE_PAGES);
 
-   node_free_pages = node_page_state(numa_node_id(),
-         NR_FREE_PAGES);
    max = node_free_pages / FRACTION_OF_NODE_MEM;
    return max(max, min_pages);
 }


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