~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to mm/page_alloc.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#include <linux/pagevec.h>
31
31
#include <linux/blkdev.h>
32
32
#include <linux/slab.h>
 
33
#include <linux/ratelimit.h>
33
34
#include <linux/oom.h>
34
35
#include <linux/notifier.h>
35
36
#include <linux/topology.h>
39
40
#include <linux/memory_hotplug.h>
40
41
#include <linux/nodemask.h>
41
42
#include <linux/vmalloc.h>
 
43
#include <linux/vmstat.h>
42
44
#include <linux/mempolicy.h>
43
45
#include <linux/stop_machine.h>
44
46
#include <linux/sort.h>
53
55
#include <linux/compaction.h>
54
56
#include <trace/events/kmem.h>
55
57
#include <linux/ftrace_event.h>
56
 
#include <trace/page_alloc.h>
 
58
#include <linux/memcontrol.h>
 
59
#include <linux/prefetch.h>
57
60
 
58
61
#include <asm/tlbflush.h>
59
62
#include <asm/div64.h>
130
133
int pageblock_order __read_mostly;
131
134
#endif
132
135
 
133
 
DEFINE_TRACE(page_alloc);
134
 
DEFINE_TRACE(page_free);
135
 
 
136
136
static void __free_pages_ok(struct page *page, unsigned int order);
137
137
 
138
138
/*
569
569
        if (unlikely(page_mapcount(page) |
570
570
                (page->mapping != NULL)  |
571
571
                (atomic_read(&page->_count) != 0) |
572
 
                (page->flags & PAGE_FLAGS_CHECK_AT_FREE))) {
 
572
                (page->flags & PAGE_FLAGS_CHECK_AT_FREE) |
 
573
                (mem_cgroup_bad_page_check(page)))) {
573
574
                bad_page(page);
574
575
                return 1;
575
576
        }
618
619
                        list = &pcp->lists[migratetype];
619
620
                } while (list_empty(list));
620
621
 
 
622
                /* This is the only non-empty list. Free them all. */
 
623
                if (batch_free == MIGRATE_PCPTYPES)
 
624
                        batch_free = to_free;
 
625
 
621
626
                do {
622
627
                        page = list_entry(list->prev, struct page, lru);
623
628
                        /* must delete as __free_one_page list manipulates */
651
656
        trace_mm_page_free_direct(page, order);
652
657
        kmemcheck_free_shadow(page, order);
653
658
 
654
 
        trace_page_free(page, order);
655
 
 
656
659
        if (PageAnon(page))
657
660
                page->mapping = NULL;
658
661
        for (i = 0; i < (1 << order); i++)
756
759
        if (unlikely(page_mapcount(page) |
757
760
                (page->mapping != NULL)  |
758
761
                (atomic_read(&page->_count) != 0)  |
759
 
                (page->flags & PAGE_FLAGS_CHECK_AT_PREP))) {
 
762
                (page->flags & PAGE_FLAGS_CHECK_AT_PREP) |
 
763
                (mem_cgroup_bad_page_check(page)))) {
760
764
                bad_page(page);
761
765
                return 1;
762
766
        }
869
873
                }
870
874
 
871
875
                order = page_order(page);
872
 
                list_del(&page->lru);
873
 
                list_add(&page->lru,
874
 
                        &zone->free_area[order].free_list[migratetype]);
 
876
                list_move(&page->lru,
 
877
                          &zone->free_area[order].free_list[migratetype]);
875
878
                page += 1 << order;
876
879
                pages_moved += 1 << order;
877
880
        }
942
945
                         * If breaking a large block of pages, move all free
943
946
                         * pages to the preferred allocation list. If falling
944
947
                         * back for a reclaimable kernel allocation, be more
945
 
                         * agressive about taking ownership of free pages
 
948
                         * aggressive about taking ownership of free pages
946
949
                         */
947
950
                        if (unlikely(current_order >= (pageblock_order >> 1)) ||
948
951
                                        start_migratetype == MIGRATE_RECLAIMABLE ||
1339
1342
        }
1340
1343
 
1341
1344
        __count_zone_vm_events(PGALLOC, zone, 1 << order);
1342
 
        zone_statistics(preferred_zone, zone);
 
1345
        zone_statistics(preferred_zone, zone, gfp_flags);
1343
1346
        local_irq_restore(flags);
1344
1347
 
1345
1348
        VM_BUG_ON(bad_range(zone, page));
1720
1723
        return page;
1721
1724
}
1722
1725
 
 
1726
/*
 
1727
 * Large machines with many possible nodes should not always dump per-node
 
1728
 * meminfo in irq context.
 
1729
 */
 
1730
static inline bool should_suppress_show_mem(void)
 
1731
{
 
1732
        bool ret = false;
 
1733
 
 
1734
#if NODES_SHIFT > 8
 
1735
        ret = in_interrupt();
 
1736
#endif
 
1737
        return ret;
 
1738
}
 
1739
 
 
1740
static DEFINE_RATELIMIT_STATE(nopage_rs,
 
1741
                DEFAULT_RATELIMIT_INTERVAL,
 
1742
                DEFAULT_RATELIMIT_BURST);
 
1743
 
 
1744
void warn_alloc_failed(gfp_t gfp_mask, int order, const char *fmt, ...)
 
1745
{
 
1746
        va_list args;
 
1747
        unsigned int filter = SHOW_MEM_FILTER_NODES;
 
1748
 
 
1749
        if ((gfp_mask & __GFP_NOWARN) || !__ratelimit(&nopage_rs))
 
1750
                return;
 
1751
 
 
1752
        /*
 
1753
         * This documents exceptions given to allocations in certain
 
1754
         * contexts that are allowed to allocate outside current's set
 
1755
         * of allowed nodes.
 
1756
         */
 
1757
        if (!(gfp_mask & __GFP_NOMEMALLOC))
 
1758
                if (test_thread_flag(TIF_MEMDIE) ||
 
1759
                    (current->flags & (PF_MEMALLOC | PF_EXITING)))
 
1760
                        filter &= ~SHOW_MEM_FILTER_NODES;
 
1761
        if (in_interrupt() || !(gfp_mask & __GFP_WAIT))
 
1762
                filter &= ~SHOW_MEM_FILTER_NODES;
 
1763
 
 
1764
        if (fmt) {
 
1765
                printk(KERN_WARNING);
 
1766
                va_start(args, fmt);
 
1767
                vprintk(fmt, args);
 
1768
                va_end(args);
 
1769
        }
 
1770
 
 
1771
        pr_warning("%s: page allocation failure: order:%d, mode:0x%x\n",
 
1772
                   current->comm, order, gfp_mask);
 
1773
 
 
1774
        dump_stack();
 
1775
        if (!should_suppress_show_mem())
 
1776
                show_mem(filter);
 
1777
}
 
1778
 
1723
1779
static inline int
1724
1780
should_alloc_retry(gfp_t gfp_mask, unsigned int order,
1725
1781
                                unsigned long pages_reclaimed)
2050
2106
                first_zones_zonelist(zonelist, high_zoneidx, NULL,
2051
2107
                                        &preferred_zone);
2052
2108
 
 
2109
rebalance:
2053
2110
        /* This is the last chance, in general, before the goto nopage. */
2054
2111
        page = get_page_from_freelist(gfp_mask, nodemask, order, zonelist,
2055
2112
                        high_zoneidx, alloc_flags & ~ALLOC_NO_WATERMARKS,
2057
2114
        if (page)
2058
2115
                goto got_pg;
2059
2116
 
2060
 
rebalance:
2061
2117
        /* Allocate without watermarks if the context allows */
2062
2118
        if (alloc_flags & ALLOC_NO_WATERMARKS) {
2063
2119
                page = __alloc_pages_high_priority(gfp_mask, order,
2162
2218
        }
2163
2219
 
2164
2220
nopage:
2165
 
        if (!(gfp_mask & __GFP_NOWARN) && printk_ratelimit()) {
2166
 
                printk(KERN_WARNING "%s: page allocation failure."
2167
 
                        " order:%d, mode:0x%x\n",
2168
 
                        current->comm, order, gfp_mask);
2169
 
                dump_stack();
2170
 
                show_mem();
2171
 
        }
 
2221
        warn_alloc_failed(gfp_mask, order, NULL);
2172
2222
        return page;
2173
2223
got_pg:
2174
 
        trace_page_alloc(page, order);
2175
2224
        if (kmemcheck_enabled)
2176
2225
                kmemcheck_pagealloc_alloc(page, order, gfp_mask);
2177
2226
        return page;
2290
2339
 
2291
2340
EXPORT_SYMBOL(free_pages);
2292
2341
 
 
2342
static void *make_alloc_exact(unsigned long addr, unsigned order, size_t size)
 
2343
{
 
2344
        if (addr) {
 
2345
                unsigned long alloc_end = addr + (PAGE_SIZE << order);
 
2346
                unsigned long used = addr + PAGE_ALIGN(size);
 
2347
 
 
2348
                split_page(virt_to_page((void *)addr), order);
 
2349
                while (used < alloc_end) {
 
2350
                        free_page(used);
 
2351
                        used += PAGE_SIZE;
 
2352
                }
 
2353
        }
 
2354
        return (void *)addr;
 
2355
}
 
2356
 
2293
2357
/**
2294
2358
 * alloc_pages_exact - allocate an exact number physically-contiguous pages.
2295
2359
 * @size: the number of bytes to allocate
2309
2373
        unsigned long addr;
2310
2374
 
2311
2375
        addr = __get_free_pages(gfp_mask, order);
2312
 
        if (addr) {
2313
 
                unsigned long alloc_end = addr + (PAGE_SIZE << order);
2314
 
                unsigned long used = addr + PAGE_ALIGN(size);
2315
 
 
2316
 
                split_page(virt_to_page((void *)addr), order);
2317
 
                while (used < alloc_end) {
2318
 
                        free_page(used);
2319
 
                        used += PAGE_SIZE;
2320
 
                }
2321
 
        }
2322
 
 
2323
 
        return (void *)addr;
 
2376
        return make_alloc_exact(addr, order, size);
2324
2377
}
2325
2378
EXPORT_SYMBOL(alloc_pages_exact);
2326
2379
 
2327
2380
/**
 
2381
 * alloc_pages_exact_nid - allocate an exact number of physically-contiguous
 
2382
 *                         pages on a node.
 
2383
 * @nid: the preferred node ID where memory should be allocated
 
2384
 * @size: the number of bytes to allocate
 
2385
 * @gfp_mask: GFP flags for the allocation
 
2386
 *
 
2387
 * Like alloc_pages_exact(), but try to allocate on node nid first before falling
 
2388
 * back.
 
2389
 * Note this is not alloc_pages_exact_node() which allocates on a specific node,
 
2390
 * but is not exact.
 
2391
 */
 
2392
void *alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask)
 
2393
{
 
2394
        unsigned order = get_order(size);
 
2395
        struct page *p = alloc_pages_node(nid, gfp_mask, order);
 
2396
        if (!p)
 
2397
                return NULL;
 
2398
        return make_alloc_exact((unsigned long)page_address(p), order, size);
 
2399
}
 
2400
EXPORT_SYMBOL(alloc_pages_exact_nid);
 
2401
 
 
2402
/**
2328
2403
 * free_pages_exact - release memory allocated via alloc_pages_exact()
2329
2404
 * @virt: the value returned by alloc_pages_exact.
2330
2405
 * @size: size of allocation, same value as passed to alloc_pages_exact().
2418
2493
}
2419
2494
#endif
2420
2495
 
 
2496
/*
 
2497
 * Determine whether the node should be displayed or not, depending on whether
 
2498
 * SHOW_MEM_FILTER_NODES was passed to show_free_areas().
 
2499
 */
 
2500
bool skip_free_areas_node(unsigned int flags, int nid)
 
2501
{
 
2502
        bool ret = false;
 
2503
 
 
2504
        if (!(flags & SHOW_MEM_FILTER_NODES))
 
2505
                goto out;
 
2506
 
 
2507
        get_mems_allowed();
 
2508
        ret = !node_isset(nid, cpuset_current_mems_allowed);
 
2509
        put_mems_allowed();
 
2510
out:
 
2511
        return ret;
 
2512
}
 
2513
 
2421
2514
#define K(x) ((x) << (PAGE_SHIFT-10))
2422
2515
 
2423
2516
/*
2424
2517
 * Show free area list (used inside shift_scroll-lock stuff)
2425
2518
 * We also calculate the percentage fragmentation. We do this by counting the
2426
2519
 * memory on each free list with the exception of the first item on the list.
 
2520
 * Suppresses nodes that are not allowed by current's cpuset if
 
2521
 * SHOW_MEM_FILTER_NODES is passed.
2427
2522
 */
2428
 
void show_free_areas(void)
 
2523
void show_free_areas(unsigned int filter)
2429
2524
{
2430
2525
        int cpu;
2431
2526
        struct zone *zone;
2432
2527
 
2433
2528
        for_each_populated_zone(zone) {
 
2529
                if (skip_free_areas_node(filter, zone_to_nid(zone)))
 
2530
                        continue;
2434
2531
                show_node(zone);
2435
2532
                printk("%s per-cpu:\n", zone->name);
2436
2533
 
2472
2569
        for_each_populated_zone(zone) {
2473
2570
                int i;
2474
2571
 
 
2572
                if (skip_free_areas_node(filter, zone_to_nid(zone)))
 
2573
                        continue;
2475
2574
                show_node(zone);
2476
2575
                printk("%s"
2477
2576
                        " free:%lukB"
2539
2638
        for_each_populated_zone(zone) {
2540
2639
                unsigned long nr[MAX_ORDER], flags, order, total = 0;
2541
2640
 
 
2641
                if (skip_free_areas_node(filter, zone_to_nid(zone)))
 
2642
                        continue;
2542
2643
                show_node(zone);
2543
2644
                printk("%s: ", zone->name);
2544
2645
 
3117
3218
 * Called with zonelists_mutex held always
3118
3219
 * unless system_state == SYSTEM_BOOTING.
3119
3220
 */
3120
 
void build_all_zonelists(void *data)
 
3221
void __ref build_all_zonelists(void *data)
3121
3222
{
3122
3223
        set_zonelist_order();
3123
3224
 
3228
3329
#define LONG_ALIGN(x) (((x)+(sizeof(long))-1)&~((sizeof(long))-1))
3229
3330
 
3230
3331
/*
 
3332
 * Check if a pageblock contains reserved pages
 
3333
 */
 
3334
static int pageblock_is_reserved(unsigned long start_pfn, unsigned long end_pfn)
 
3335
{
 
3336
        unsigned long pfn;
 
3337
 
 
3338
        for (pfn = start_pfn; pfn < end_pfn; pfn++) {
 
3339
                if (!pfn_valid_within(pfn) || PageReserved(pfn_to_page(pfn)))
 
3340
                        return 1;
 
3341
        }
 
3342
        return 0;
 
3343
}
 
3344
 
 
3345
/*
3231
3346
 * Mark a number of pageblocks as MIGRATE_RESERVE. The number
3232
3347
 * of blocks reserved is based on min_wmark_pages(zone). The memory within
3233
3348
 * the reserve will tend to store contiguous free pages. Setting min_free_kbytes
3236
3351
 */
3237
3352
static void setup_zone_migrate_reserve(struct zone *zone)
3238
3353
{
3239
 
        unsigned long start_pfn, pfn, end_pfn;
 
3354
        unsigned long start_pfn, pfn, end_pfn, block_end_pfn;
3240
3355
        struct page *page;
3241
3356
        unsigned long block_migratetype;
3242
3357
        int reserve;
3266
3381
                        continue;
3267
3382
 
3268
3383
                /* Blocks with reserved pages will never free, skip them. */
3269
 
                if (PageReserved(page))
 
3384
                block_end_pfn = min(pfn + pageblock_nr_pages, end_pfn);
 
3385
                if (pageblock_is_reserved(pfn, block_end_pfn))
3270
3386
                        continue;
3271
3387
 
3272
3388
                block_migratetype = get_pageblock_migratetype(page);
3455
3571
                pcp->batch = PAGE_SHIFT * 8;
3456
3572
}
3457
3573
 
3458
 
static __meminit void setup_zone_pageset(struct zone *zone)
 
3574
static void setup_zone_pageset(struct zone *zone)
3459
3575
{
3460
3576
        int cpu;
3461
3577
 
3505
3621
 
3506
3622
        if (!slab_is_available()) {
3507
3623
                zone->wait_table = (wait_queue_head_t *)
3508
 
                        alloc_bootmem_node(pgdat, alloc_size);
 
3624
                        alloc_bootmem_node_nopanic(pgdat, alloc_size);
3509
3625
        } else {
3510
3626
                /*
3511
3627
                 * This case means that a zone whose size was 0 gets new memory
3706
3822
}
3707
3823
 
3708
3824
#ifdef CONFIG_HAVE_MEMBLOCK
 
3825
/*
 
3826
 * Basic iterator support. Return the last range of PFNs for a node
 
3827
 * Note: nid == MAX_NUMNODES returns last region regardless of node
 
3828
 */
 
3829
static int __meminit last_active_region_index_in_nid(int nid)
 
3830
{
 
3831
        int i;
 
3832
 
 
3833
        for (i = nr_nodemap_entries - 1; i >= 0; i--)
 
3834
                if (nid == MAX_NUMNODES || early_node_map[i].nid == nid)
 
3835
                        return i;
 
3836
 
 
3837
        return -1;
 
3838
}
 
3839
 
 
3840
/*
 
3841
 * Basic iterator support. Return the previous active range of PFNs for a node
 
3842
 * Note: nid == MAX_NUMNODES returns next region regardless of node
 
3843
 */
 
3844
static int __meminit previous_active_region_index_in_nid(int index, int nid)
 
3845
{
 
3846
        for (index = index - 1; index >= 0; index--)
 
3847
                if (nid == MAX_NUMNODES || early_node_map[index].nid == nid)
 
3848
                        return index;
 
3849
 
 
3850
        return -1;
 
3851
}
 
3852
 
 
3853
#define for_each_active_range_index_in_nid_reverse(i, nid) \
 
3854
        for (i = last_active_region_index_in_nid(nid); i != -1; \
 
3855
                                i = previous_active_region_index_in_nid(i, nid))
 
3856
 
3709
3857
u64 __init find_memory_core_early(int nid, u64 size, u64 align,
3710
3858
                                        u64 goal, u64 limit)
3711
3859
{
3712
3860
        int i;
3713
3861
 
3714
3862
        /* Need to go over early_node_map to find out good range for node */
3715
 
        for_each_active_range_index_in_nid(i, nid) {
 
3863
        for_each_active_range_index_in_nid_reverse(i, nid) {
3716
3864
                u64 addr;
3717
3865
                u64 ei_start, ei_last;
3718
3866
                u64 final_start, final_end;
3755
3903
        return nr_range;
3756
3904
}
3757
3905
 
3758
 
#ifdef CONFIG_NO_BOOTMEM
3759
 
void * __init __alloc_memory_core_early(int nid, u64 size, u64 align,
3760
 
                                        u64 goal, u64 limit)
3761
 
{
3762
 
        void *ptr;
3763
 
        u64 addr;
3764
 
 
3765
 
        if (limit > memblock.current_limit)
3766
 
                limit = memblock.current_limit;
3767
 
 
3768
 
        addr = find_memory_core_early(nid, size, align, goal, limit);
3769
 
 
3770
 
        if (addr == MEMBLOCK_ERROR)
3771
 
                return NULL;
3772
 
 
3773
 
        ptr = phys_to_virt(addr);
3774
 
        memset(ptr, 0, size);
3775
 
        memblock_x86_reserve_range(addr, addr + size, "BOOTMEM");
3776
 
        /*
3777
 
         * The min_count is set to 0 so that bootmem allocated blocks
3778
 
         * are never reported as leaks.
3779
 
         */
3780
 
        kmemleak_alloc(ptr, size, 0, 0);
3781
 
        return ptr;
3782
 
}
3783
 
#endif
3784
 
 
3785
 
 
3786
3906
void __init work_with_active_regions(int nid, work_fn_t work_fn, void *data)
3787
3907
{
3788
3908
        int i;
3863
3983
 
3864
3984
/*
3865
3985
 * The zone ranges provided by the architecture do not include ZONE_MOVABLE
3866
 
 * because it is sized independant of architecture. Unlike the other zones,
 
3986
 * because it is sized independent of architecture. Unlike the other zones,
3867
3987
 * the starting point for ZONE_MOVABLE is not fixed. It may be different
3868
3988
 * in each node depending on the size of each node and how evenly kernelcore
3869
3989
 * is distributed. This helper function adjusts the zone ranges
4078
4198
        unsigned long usemapsize = usemap_size(zonesize);
4079
4199
        zone->pageblock_flags = NULL;
4080
4200
        if (usemapsize)
4081
 
                zone->pageblock_flags = alloc_bootmem_node(pgdat, usemapsize);
 
4201
                zone->pageblock_flags = alloc_bootmem_node_nopanic(pgdat,
 
4202
                                                                   usemapsize);
4082
4203
}
4083
4204
#else
4084
4205
static inline void setup_usemap(struct pglist_data *pgdat,
4198
4319
                zone->zone_pgdat = pgdat;
4199
4320
 
4200
4321
                zone_pcp_init(zone);
4201
 
                for_each_lru(l) {
 
4322
                for_each_lru(l)
4202
4323
                        INIT_LIST_HEAD(&zone->lru[l].list);
4203
 
                        zone->reclaim_stat.nr_saved_scan[l] = 0;
4204
 
                }
4205
4324
                zone->reclaim_stat.recent_rotated[0] = 0;
4206
4325
                zone->reclaim_stat.recent_rotated[1] = 0;
4207
4326
                zone->reclaim_stat.recent_scanned[0] = 0;
4244
4363
                size =  (end - start) * sizeof(struct page);
4245
4364
                map = alloc_remap(pgdat->node_id, size);
4246
4365
                if (!map)
4247
 
                        map = alloc_bootmem_node(pgdat, size);
 
4366
                        map = alloc_bootmem_node_nopanic(pgdat, size);
4248
4367
                pgdat->node_mem_map = map + (pgdat->node_start_pfn - start);
4249
4368
        }
4250
4369
#ifndef CONFIG_NEED_MULTIPLE_NODES
4816
4935
        dma_reserve = new_dma_reserve;
4817
4936
}
4818
4937
 
4819
 
#ifndef CONFIG_NEED_MULTIPLE_NODES
4820
 
struct pglist_data __refdata contig_page_data = {
4821
 
#ifndef CONFIG_NO_BOOTMEM
4822
 
 .bdata = &bootmem_node_data[0]
4823
 
#endif
4824
 
 };
4825
 
EXPORT_SYMBOL(contig_page_data);
4826
 
#endif
4827
 
 
4828
4938
void __init free_area_init(unsigned long *zones_size)
4829
4939
{
4830
4940
        free_area_init_node(0, zones_size,
5018
5128
 *    1TB     101        10GB
5019
5129
 *   10TB     320        32GB
5020
5130
 */
5021
 
void calculate_zone_inactive_ratio(struct zone *zone)
 
5131
static void __meminit calculate_zone_inactive_ratio(struct zone *zone)
5022
5132
{
5023
5133
        unsigned int gb, ratio;
5024
5134
 
5032
5142
        zone->inactive_ratio = ratio;
5033
5143
}
5034
5144
 
5035
 
static void __init setup_per_zone_inactive_ratio(void)
 
5145
static void __meminit setup_per_zone_inactive_ratio(void)
5036
5146
{
5037
5147
        struct zone *zone;
5038
5148
 
5064
5174
 * 8192MB:      11584k
5065
5175
 * 16384MB:     16384k
5066
5176
 */
5067
 
static int __init init_per_zone_wmark_min(void)
 
5177
int __meminit init_per_zone_wmark_min(void)
5068
5178
{
5069
5179
        unsigned long lowmem_kbytes;
5070
5180
 
5076
5186
        if (min_free_kbytes > 65536)
5077
5187
                min_free_kbytes = 65536;
5078
5188
        setup_per_zone_wmarks();
 
5189
        refresh_zone_stat_thresholds();
5079
5190
        setup_per_zone_lowmem_reserve();
5080
5191
        setup_per_zone_inactive_ratio();
5081
5192
        return 0;
5426
5537
        struct memory_isolate_notify arg;
5427
5538
        int notifier_ret;
5428
5539
        int ret = -EBUSY;
5429
 
        int zone_idx;
5430
5540
 
5431
5541
        zone = page_zone(page);
5432
 
        zone_idx = zone_idx(zone);
5433
5542
 
5434
5543
        spin_lock_irqsave(&zone->lock, flags);
5435
5544
 
5633
5742
                page, atomic_read(&page->_count), page_mapcount(page),
5634
5743
                page->mapping, page->index);
5635
5744
        dump_page_flags(page->flags);
 
5745
        mem_cgroup_print_bad_page(page);
5636
5746
}