Skip to content

Commit

Permalink
delete prink debug message
Browse files Browse the repository at this point in the history
  • Loading branch information
yjiao committed Jun 3, 2015
1 parent 63b48b1 commit 13c94a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 48 deletions.
4 changes: 4 additions & 0 deletions mm/highmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ struct page *kmap_to_page(void *vaddr)
}
EXPORT_SYMBOL(kmap_to_page);

#if 1
#define cache_is_vivt() 0
#endif

static void flush_all_zero_pkmaps(void)
{
int i;
Expand Down
51 changes: 3 additions & 48 deletions mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,6 @@ static inline void expand(struct zone *zone, struct page *page,


list_add(&page[size].lru, &area->free_list[migratetype]);
printk("I am %s, pfn: %lu\n", __func__, page_to_pfn(&page[size]));
area->nr_free++;
set_page_order(&page[size], high);
}
Expand Down Expand Up @@ -1057,13 +1056,9 @@ struct page *__rmqueue_smallest(struct zone *zone, unsigned int order,
if (list_empty(&area->free_list[migratetype]))
continue;

printk("I am %s: mt: %d order:%d\n", __func__, migratetype, order);
page = list_entry(area->free_list[migratetype].next,
struct page, lru);
printk("I am %s: pfn %lu lru:%p\n", __func__, page_to_pfn(page), &page->lru);
printk("next:%p, prev:%p\n", (&page->lru)->next, (&page->lru)->prev);
list_del(&page->lru);
printk("I am %s, %d\n", __func__, __LINE__);
rmv_page_order(page);
area->nr_free--;
expand(zone, page, order, current_order, area, migratetype);
Expand Down Expand Up @@ -1342,7 +1337,6 @@ static struct page *__rmqueue(struct zone *zone, unsigned int order,
struct page *page;

retry_reserve:
printk("I am %s: %d\n", __func__, __LINE__);
page = __rmqueue_smallest(zone, order, migratetype);

if (unlikely(!page) && migratetype != MIGRATE_RESERVE) {
Expand All @@ -1363,7 +1357,6 @@ static struct page *__rmqueue(struct zone *zone, unsigned int order,
}
}

printk("I am %s: %d\n", __func__, __LINE__);
trace_mm_page_alloc_zone_locked(page, order, migratetype);
return page;
}
Expand Down Expand Up @@ -1765,7 +1758,6 @@ struct page *buffered_rmqueue(struct zone *preferred_zone,
pcp = &this_cpu_ptr(zone->pageset)->pcp;
list = &pcp->lists[migratetype];
if (list_empty(list)) {
printk("I am %s: %d\n", __func__, __LINE__);
pcp->count += rmqueue_bulk(zone, 0,
pcp->batch, list,
migratetype, cold);
Expand Down Expand Up @@ -1804,15 +1796,11 @@ struct page *buffered_rmqueue(struct zone *preferred_zone,
get_freepage_migratetype(page));
}


printk("I am %s: %d\n", __func__, __LINE__);
__mod_zone_page_state(zone, NR_ALLOC_BATCH, -(1 << order));
if (atomic_long_read(&zone->vm_stat[NR_ALLOC_BATCH]) <= 0 &&
!test_bit(ZONE_FAIR_DEPLETED, &zone->flags))
set_bit(ZONE_FAIR_DEPLETED, &zone->flags);

printk("I am %s: %d\n", __func__, __LINE__);
printk("I am %s: pfn: %lu\n", __func__, page_to_pfn(page));
__count_zone_vm_events(PGALLOC, zone, 1 << order);
zone_statistics(preferred_zone, zone, gfp_flags);
local_irq_restore(flags);
Expand Down Expand Up @@ -2280,26 +2268,17 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags,
}

try_this_zone:

printk("I am %s: %d\n", __func__, __LINE__);
page = buffered_rmqueue(ac->preferred_zone, zone, order,
gfp_mask, ac->migratetype);
printk("I am %s: %d\n", __func__, __LINE__);
printk("page:%lu\n", page_to_pfn(page));
if (page) {
printk("I am %s: %d\n", __func__, __LINE__);
if (prep_new_page(page, order, gfp_mask, alloc_flags))
goto try_this_zone;

printk("I am %s: %d\n", __func__, __LINE__);
return page;
}


this_zone_full:
if (IS_ENABLED(CONFIG_NUMA) && zlc_active)
zlc_mark_zone_full(zonelist, z);
}
}

/*
* The first pass makes sure allocations are spread fairly within the
Expand Down Expand Up @@ -2327,10 +2306,6 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags,

if (zonelist_rescan)
goto zonelist_scan;


printk("I am %s: %d\n", __func__, __LINE__);

return NULL;
}

Expand Down Expand Up @@ -2945,23 +2920,18 @@ __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order,
if (should_fail_alloc_page(gfp_mask, order))
return NULL;


printk(KERN_INFO "I am %s line:%d\n", __func__, __LINE__);
/*
* Check the zones suitable for the gfp_mask contain at least one
* valid zone. It's possible to have an empty zonelist as a result
* of __GFP_THISNODE and a memoryless node
*/
if (unlikely(!zonelist->_zonerefs->zone)) {
printk(KERN_INFO "I am %s line:%d\n", __func__, __LINE__);
return NULL;
}

if (IS_ENABLED(CONFIG_CMA) && ac.migratetype == MIGRATE_MOVABLE)
alloc_flags |= ALLOC_CMA;

printk(KERN_INFO "I am %s line:%d\n", __func__, __LINE__);

retry_cpuset:
cpuset_mems_cookie = read_mems_allowed_begin();

Expand All @@ -2972,19 +2942,15 @@ __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order,
ac.nodemask ? : &cpuset_current_mems_allowed,
&ac.preferred_zone);

printk(KERN_INFO "I am %s line:%d\n", __func__, __LINE__);
if (!ac.preferred_zone)
goto out;

printk(KERN_INFO "I am %s line:%d\n", __func__, __LINE__);
ac.classzone_idx = zonelist_zone_idx(preferred_zoneref);

/* First allocation attempt */
alloc_mask = gfp_mask|__GFP_HARDWALL;
page = get_page_from_freelist(alloc_mask, order, alloc_flags, &ac);

printk(KERN_INFO "I am %s line:%d\n", __func__, __LINE__);

if (unlikely(!page)) {
/*
* Runtime PM, block IO and its error handling path
Expand All @@ -3011,11 +2977,10 @@ __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order,
if (unlikely(!page && read_mems_allowed_retry(cpuset_mems_cookie)))
goto retry_cpuset;

#if 1
printk(KERN_INFO "Done: I am %s %lu\n", __func__, page_to_pfn(page));
printk(KERN_INFO "Done: I am %s %lx\n", __func__, page_to_pfn(page));
page->virtual = (void *)total_ram + (page_to_pfn(page) << PAGE_SHIFT);

print_buddy_freelist();
#endif

return page;
}
Expand All @@ -3028,7 +2993,6 @@ EXPORT_SYMBOL(__alloc_pages_nodemask);
unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order)
{
struct page *page;
printk("I am %s\n", __func__);
/*
* __get_free_pages() returns a 32-bit address, which cannot represent
* a highmem page
Expand All @@ -3038,16 +3002,13 @@ unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order)
page = alloc_pages(gfp_mask, order);
if (!page)
return 0;
printk("I am %s\n", __func__);
return (unsigned long) page_address(page);
}
EXPORT_SYMBOL(__get_free_pages);


unsigned long get_zeroed_page(gfp_t gfp_mask)
{

printk("I am %s\n", __func__);
return __get_free_pages(gfp_mask | __GFP_ZERO, 0);
}
EXPORT_SYMBOL(get_zeroed_page);
Expand Down Expand Up @@ -3272,8 +3233,6 @@ void *alloc_pages_exact(size_t size, gfp_t gfp_mask)
unsigned int order = get_order(size);
unsigned long addr;

printk("I am %s\n", __func__);

addr = __get_free_pages(gfp_mask, order);
return make_alloc_exact(addr, order, size);
}
Expand Down Expand Up @@ -5228,8 +5187,6 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat,
zone->zone_pgdat = pgdat;
zone_pcp_init(zone);

printk("I am %s size:%lu\n", __func__, size);

/* For bootup, initialized properly in watermark setup */
mod_zone_page_state(zone, NR_ALLOC_BATCH, zone->managed_pages);

Expand All @@ -5249,8 +5206,6 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat,

static void __init_refok alloc_node_mem_map(struct pglist_data *pgdat)
{
printk("I am %s %lu\n", __func__, pgdat->node_spanned_pages);

/* Skip empty nodes */
if (!pgdat->node_spanned_pages)
return;
Expand Down

0 comments on commit 13c94a1

Please sign in to comment.