Merge branch 'stable-3.2' into pandora-3.2
[pandora-kernel.git] / mm / page_alloc.c
index dceb1be..38cd47d 100644 (file)
@@ -1894,6 +1894,13 @@ void warn_alloc_failed(gfp_t gfp_mask, int order, const char *fmt, ...)
            debug_guardpage_minorder() > 0)
                return;
 
+       /*
+        * Walking all memory to count page types is very expensive and should
+        * be inhibited in non-blockable contexts.
+        */
+       if (!(gfp_mask & __GFP_WAIT))
+               filter |= SHOW_MEM_FILTER_PAGE_COUNT;
+
        /*
         * This documents exceptions given to allocations in certain
         * contexts that are allowed to allocate outside current's set
@@ -6198,6 +6205,10 @@ __offline_isolated_pages(unsigned long start_pfn, unsigned long end_pfn)
                zone->free_area[order].nr_free--;
                __mod_zone_page_state(zone, NR_FREE_PAGES,
                                      - (1UL << order));
+#ifdef CONFIG_HIGHMEM
+               if (PageHighMem(page))
+                       totalhigh_pages -= 1 << order;
+#endif
                for (i = 0; i < (1 << order); i++)
                        SetPageReserved((page+i));
                pfn += (1 << order);