From dd9675d65eded9dea6200a69cc52468c7015ea85 Mon Sep 17 00:00:00 2001 From: Balazs Gerofi Date: Wed, 19 Jul 2017 09:11:44 +0900 Subject: [PATCH] NUMA: only print a short summary at boot time --- arch/x86/kernel/memory.c | 3 ++- kernel/mem.c | 20 +++++++++++++++----- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/arch/x86/kernel/memory.c b/arch/x86/kernel/memory.c index 3213a454..f05dba8b 100644 --- a/arch/x86/kernel/memory.c +++ b/arch/x86/kernel/memory.c @@ -2067,7 +2067,8 @@ void *map_fixed_area(unsigned long phys, unsigned long size, int uncachable) attr |= PTATTR_UNCACHABLE; } - kprintf("map_fixed: %lx => %p (%d pages)\n", paligned, v, npages); + kprintf("map_fixed: phys: 0x%lx => 0x%lx (%d pages)\n", + paligned, v, npages); for (i = 0; i < npages; i++) { if(__set_pt_page(init_pt, (void *)fixed_virt, paligned, attr)){ diff --git a/kernel/mem.c b/kernel/mem.c index f64c4fa9..25259538 100644 --- a/kernel/mem.c +++ b/kernel/mem.c @@ -1150,9 +1150,6 @@ static void numa_init(void) memory_nodes[i].nr_pages = 0; memory_nodes[i].nr_free_pages = 0; #endif - - kprintf("NUMA: %d, Linux NUMA: %d, type: %d\n", - i, linux_numa_id, type); } for (j = 0; j < ihk_mc_get_nr_memory_chunks(); ++j) { @@ -1179,13 +1176,13 @@ static void numa_init(void) #endif #ifdef IHK_RBTREE_ALLOCATOR - kprintf("Physical memory: 0x%lx - 0x%lx, %lu bytes, %d pages available @ NUMA: %d\n", + dkprintf("Physical memory: 0x%lx - 0x%lx, %lu bytes, %d pages available @ NUMA: %d\n", start, end, end - start, (end - start) >> PAGE_SHIFT, numa_id); #else - kprintf("Physical memory: 0x%lx - 0x%lx, %lu bytes, %d pages available @ NUMA: %d\n", + dkprintf("Physical memory: 0x%lx - 0x%lx, %lu bytes, %d pages available @ NUMA: %d\n", start, end, ihk_pagealloc_count(allocator) * PAGE_SIZE, ihk_pagealloc_count(allocator), @@ -1196,6 +1193,19 @@ static void numa_init(void) #else rusage_total_memory_add(ihk_pagealloc_count(allocator) * PAGE_SIZE); +#endif + } + + for (i = 0; i < ihk_mc_get_nr_numa_nodes(); ++i) { +#ifdef IHK_RBTREE_ALLOCATOR + kprintf("NUMA: %d, Linux NUMA: %d, type: %d, " + "available bytes: %lu, pages: %d\n", + i, memory_nodes[i].linux_numa_id, memory_nodes[i].type, + memory_nodes[i].nr_free_pages * PAGE_SIZE, + memory_nodes[i].nr_free_pages); +#else + kprintf("NUMA: %d, Linux NUMA: %d, type: %d\n", + i, memory_nodes[i].linux_numa_id, memory_nodes[i].type); #endif } }