aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-06-10 05:22:26 -0400
committerDavid S. Miller <davem@davemloft.net>2008-06-10 05:22:26 -0400
commit65b53e4cc90e59936733b3b95b9451d2ca47528d (patch)
tree29932718192962671c48c3fd1ea017a6112459e8 /mm/page_alloc.c
parent788c0a53164c05c5ccdb1472474372b72ba74644 (diff)
parent2e761e0532a784816e7e822dbaaece8c5d4be14d (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/tg3.c drivers/net/wireless/rt2x00/rt2x00dev.c net/mac80211/ieee80211_i.h
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 63835579323a..8e83f02cd2d3 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1396,6 +1396,9 @@ get_page_from_freelist(gfp_t gfp_mask, nodemask_t *nodemask, unsigned int order,
1396 1396
1397 (void)first_zones_zonelist(zonelist, high_zoneidx, nodemask, 1397 (void)first_zones_zonelist(zonelist, high_zoneidx, nodemask,
1398 &preferred_zone); 1398 &preferred_zone);
1399 if (!preferred_zone)
1400 return NULL;
1401
1399 classzone_idx = zone_idx(preferred_zone); 1402 classzone_idx = zone_idx(preferred_zone);
1400 1403
1401zonelist_scan: 1404zonelist_scan:
@@ -2804,7 +2807,7 @@ int zone_wait_table_init(struct zone *zone, unsigned long zone_size_pages)
2804 alloc_size = zone->wait_table_hash_nr_entries 2807 alloc_size = zone->wait_table_hash_nr_entries
2805 * sizeof(wait_queue_head_t); 2808 * sizeof(wait_queue_head_t);
2806 2809
2807 if (system_state == SYSTEM_BOOTING) { 2810 if (!slab_is_available()) {
2808 zone->wait_table = (wait_queue_head_t *) 2811 zone->wait_table = (wait_queue_head_t *)
2809 alloc_bootmem_node(pgdat, alloc_size); 2812 alloc_bootmem_node(pgdat, alloc_size);
2810 } else { 2813 } else {
@@ -3378,7 +3381,8 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat,
3378 * is used by this zone for memmap. This affects the watermark 3381 * is used by this zone for memmap. This affects the watermark
3379 * and per-cpu initialisations 3382 * and per-cpu initialisations
3380 */ 3383 */
3381 memmap_pages = (size * sizeof(struct page)) >> PAGE_SHIFT; 3384 memmap_pages =
3385 PAGE_ALIGN(size * sizeof(struct page)) >> PAGE_SHIFT;
3382 if (realsize >= memmap_pages) { 3386 if (realsize >= memmap_pages) {
3383 realsize -= memmap_pages; 3387 realsize -= memmap_pages;
3384 printk(KERN_DEBUG 3388 printk(KERN_DEBUG