From patchwork Fri Jan 21 20:25:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Travis X-Patchwork-Id: 496391 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 p0LKPa8t003353 for ; Fri, 21 Jan 2011 20:25:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754559Ab1AUUZI (ORCPT ); Fri, 21 Jan 2011 15:25:08 -0500 Received: from relay2.sgi.com ([192.48.179.30]:45248 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752924Ab1AUUZF (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 6CED530408D; Fri, 21 Jan 2011 12:25:05 -0800 (PST) Received: by gulag1.americas.sgi.com (Postfix, from userid 5508) id C0E3510377FEC; Fri, 21 Jan 2011 14:25:04 -0600 (CST) Message-Id: <20110121202504.354385643@gulag1.americas.sgi.com> References: <20110121202502.090169599@gulag1.americas.sgi.com> User-Agent: quilt/0.46-1 Date: Fri, 21 Jan 2011 14:25:07 -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 5/6] x86: Minimize SRAT messages Content-Disposition: inline; filename=minimize-srat-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/mm/srat_64.c +++ linux-2.6.32/arch/x86/mm/srat_64.c @@ -115,6 +115,7 @@ acpi_numa_x2apic_affinity_init(struct ac { int pxm, node; int apic_id; + static int __initdata last_node = -1, last_pxm = -1; if (srat_disabled()) return; @@ -136,8 +137,16 @@ acpi_numa_x2apic_affinity_init(struct ac apicid_to_node[apic_id] = node; node_set(node, cpu_nodes_parsed); acpi_numa = 1; - printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n", - pxm, apic_id, node); + if (node != last_node) { + pr_info("SRAT: Node %u: PXM:APIC %u:%u", + node, pxm, apic_id); + last_node = node; + last_pxm = pxm; + } else if (pxm != last_pxm) { + pr_cont(" %u:%u", pxm, apic_id); + last_pxm = pxm; + } else + pr_cont(" :%u", apic_id); } /* Callback for Proximity Domain -> LAPIC mapping */ @@ -294,8 +303,7 @@ acpi_numa_memory_affinity_init(struct ac nd->end = end; } - printk(KERN_INFO "SRAT: Node %u PXM %u %lx-%lx\n", node, pxm, - start, end); + pr_info("SRAT: Node %u PXM %u %lx+%lx\n", node, pxm, start, end-start); e820_register_active_regions(node, start >> PAGE_SHIFT, end >> PAGE_SHIFT); --- linux-2.6.32.orig/drivers/acpi/numa.c +++ linux-2.6.32/drivers/acpi/numa.c @@ -290,6 +290,9 @@ int __init acpi_numa_init(void) if (!acpi_table_parse(ACPI_SIG_SRAT, acpi_parse_srat)) { acpi_table_parse_srat(ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY, acpi_parse_x2apic_affinity, NR_CPUS); + /* insure trailing newline is output */ + pr_cont("\n"); + acpi_table_parse_srat(ACPI_SRAT_TYPE_CPU_AFFINITY, acpi_parse_processor_affinity, NR_CPUS); acpi_table_parse_srat(ACPI_SRAT_TYPE_MEMORY_AFFINITY,