From patchwork Fri Jan 21 20:25:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Travis X-Patchwork-Id: 496381 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0LKPa8u003353 for ; Fri, 21 Jan 2011 20:25:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754518Ab1AUUZI (ORCPT ); Fri, 21 Jan 2011 15:25:08 -0500 Received: from relay2.sgi.com ([192.48.179.30]:45239 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752179Ab1AUUZF (ORCPT ); Fri, 21 Jan 2011 15:25:05 -0500 Received: from gulag1.americas.sgi.com (gulag1.americas.sgi.com [128.162.236.41]) by relay2.corp.sgi.com (Postfix) with ESMTP id 747D530408C; Fri, 21 Jan 2011 12:25:04 -0800 (PST) Received: by gulag1.americas.sgi.com (Postfix, from userid 5508) id C6EB310377FEA; Fri, 21 Jan 2011 14:25:03 -0600 (CST) Message-Id: <20110121202503.329746830@gulag1.americas.sgi.com> References: <20110121202502.090169599@gulag1.americas.sgi.com> User-Agent: quilt/0.46-1 Date: Fri, 21 Jan 2011 14:25:05 -0600 From: Mike Travis To: Andrew Morton , Ingo Molnar , Len Brown , "H. Peter Anvin" Cc: Thomas Gleixner , Jack Steiner , Robin Holt , Lori Gilbertson , x86@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/6] x86: Minimize initial Bootmem messages Content-Disposition: inline; filename=minimize-bootmem-msgs Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 21 Jan 2011 20:25:38 +0000 (UTC) --- linux-2.6.32.orig/arch/x86/kernel/e820.c +++ linux-2.6.32/arch/x86/kernel/e820.c @@ -922,29 +922,42 @@ void __init free_early(u64 start, u64 en void __init early_res_to_bootmem(u64 start, u64 end) { - int i, count; + int i, count, same = 1; u64 final_start, final_end; + static struct early_res prev[MAX_EARLY_RES] __initdata; count = 0; - for (i = 0; i < MAX_EARLY_RES && early_res[i].end; i++) + for (i = 0; i < MAX_EARLY_RES && early_res[i].end; i++) { + /* remove redundant messages */ + if (prev[i].start != early_res[i].start || + prev[i].end != early_res[i].end) { + prev[i].start = early_res[i].start; + prev[i].end = early_res[i].end; + same = 0; + } count++; + } + if (same) { + pr_cont("ER:%d %llx+%llx\n", count, start, end-start); + return; + } + + pr_info("Early Reservations: %d [%llx+%llx]\n", + count, start, end-start); - printk(KERN_INFO "(%d early reservations) ==> bootmem [%010llx - %010llx]\n", - count, start, end); for (i = 0; i < count; i++) { struct early_res *r = &early_res[i]; - printk(KERN_INFO " #%d [%010llx - %010llx] %16s", i, + pr_info(" #%d [%010llx - %010llx] %16s", i, r->start, r->end, r->name); final_start = max(start, r->start); final_end = min(end, r->end); if (final_start >= final_end) { - printk(KERN_CONT "\n"); + pr_cont("\n"); continue; } - printk(KERN_CONT " ==> [%010llx - %010llx]\n", - final_start, final_end); + pr_cont(" ==> [%010llx - %010llx]\n", final_start, final_end); reserve_bootmem_generic(final_start, final_end - final_start, - BOOTMEM_DEFAULT); + BOOTMEM_DEFAULT); } } --- linux-2.6.32.orig/arch/x86/mm/numa_64.c +++ linux-2.6.32/arch/x86/mm/numa_64.c @@ -201,9 +201,6 @@ setup_node_bootmem(int nodeid, unsigned start = roundup(start, ZONE_ALIGN); - printk(KERN_INFO "Bootmem setup node %d %016lx-%016lx\n", nodeid, - start, end); - start_pfn = start >> PAGE_SHIFT; last_pfn = end >> PAGE_SHIFT; @@ -219,8 +216,6 @@ setup_node_bootmem(int nodeid, unsigned if (node_data[nodeid] == (void *)cache_alias_offset) return; nodedata_phys = __pa(node_data[nodeid]); - printk(KERN_INFO " NODE_DATA [%016lx - %016lx]\n", nodedata_phys, - nodedata_phys + pgdat_size - 1); memset(NODE_DATA(nodeid), 0, sizeof(pg_data_t)); NODE_DATA(nodeid)->bdata = &bootmem_node_data[nodeid]; @@ -258,12 +253,11 @@ setup_node_bootmem(int nodeid, unsigned bootmap_start >> PAGE_SHIFT, start_pfn, last_pfn); - printk(KERN_INFO " bootmap [%016lx - %016lx] pages %lx\n", - bootmap_start, bootmap_start + bootmap_size - 1, - bootmap_pages); - free_bootmem_with_active_regions(nodeid, end); + pr_info("Bootmem Node %d: data %lx map %lx+%lx pgs %lx ", + nodeid, start, bootmap_start, bootmap_size, bootmap_pages); + /* * convert early reserve to bootmem reserve earlier * otherwise early_node_mem could use early reserved mem