mm/page_alloc: switch to pr_debug

Having such debug messages in the dmesg log may confuse users.  Therefore
restrict debug output to cases where DEBUG is defined or dynamic debugging
is enabled for the respective code piece.

Link: https://lkml.kernel.org/r/976adb93-3041-ce63-48fc-55a6096a51c1@gmail.com
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Heiner Kallweit 2021-06-28 19:41:31 -07:00 коммит произвёл Linus Torvalds
Родитель 1cfcee7283
Коммит 9660ecaa79
1 изменённых файлов: 6 добавлений и 10 удалений

Просмотреть файл

@ -6770,9 +6770,8 @@ static __meminit void zone_pcp_init(struct zone *zone)
zone->pageset_batch = BOOT_PAGESET_BATCH; zone->pageset_batch = BOOT_PAGESET_BATCH;
if (populated_zone(zone)) if (populated_zone(zone))
printk(KERN_DEBUG " %s zone: %lu pages, LIFO batch:%u\n", pr_debug(" %s zone: %lu pages, LIFO batch:%u\n", zone->name,
zone->name, zone->present_pages, zone->present_pages, zone_batchsize(zone));
zone_batchsize(zone));
} }
void __meminit init_currently_empty_zone(struct zone *zone, void __meminit init_currently_empty_zone(struct zone *zone,
@ -7042,8 +7041,7 @@ static void __init calculate_node_totalpages(struct pglist_data *pgdat,
pgdat->node_spanned_pages = totalpages; pgdat->node_spanned_pages = totalpages;
pgdat->node_present_pages = realtotalpages; pgdat->node_present_pages = realtotalpages;
printk(KERN_DEBUG "On node %d totalpages: %lu\n", pgdat->node_id, pr_debug("On node %d totalpages: %lu\n", pgdat->node_id, realtotalpages);
realtotalpages);
} }
#ifndef CONFIG_SPARSEMEM #ifndef CONFIG_SPARSEMEM
@ -7243,9 +7241,8 @@ static void __init free_area_init_core(struct pglist_data *pgdat)
if (freesize >= memmap_pages) { if (freesize >= memmap_pages) {
freesize -= memmap_pages; freesize -= memmap_pages;
if (memmap_pages) if (memmap_pages)
printk(KERN_DEBUG pr_debug(" %s zone: %lu pages used for memmap\n",
" %s zone: %lu pages used for memmap\n", zone_names[j], memmap_pages);
zone_names[j], memmap_pages);
} else } else
pr_warn(" %s zone: %lu pages exceeds freesize %lu\n", pr_warn(" %s zone: %lu pages exceeds freesize %lu\n",
zone_names[j], memmap_pages, freesize); zone_names[j], memmap_pages, freesize);
@ -7254,8 +7251,7 @@ static void __init free_area_init_core(struct pglist_data *pgdat)
/* Account for reserved pages */ /* Account for reserved pages */
if (j == 0 && freesize > dma_reserve) { if (j == 0 && freesize > dma_reserve) {
freesize -= dma_reserve; freesize -= dma_reserve;
printk(KERN_DEBUG " %s zone: %lu pages reserved\n", pr_debug(" %s zone: %lu pages reserved\n", zone_names[0], dma_reserve);
zone_names[0], dma_reserve);
} }
if (!is_highmem_idx(j)) if (!is_highmem_idx(j))