From patchwork Fri Feb 25 18:06:37 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Travis X-Patchwork-Id: 590831 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 p1PI78xK005646 for ; Fri, 25 Feb 2011 18:07:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932669Ab1BYSGn (ORCPT ); Fri, 25 Feb 2011 13:06:43 -0500 Received: from relay3.sgi.com ([192.48.152.1]:47169 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756089Ab1BYSGl (ORCPT ); Fri, 25 Feb 2011 13:06:41 -0500 Received: from gulag1.americas.sgi.com (gulag1.americas.sgi.com [128.162.236.41]) by relay3.corp.sgi.com (Postfix) with ESMTP id D3654AC014; Fri, 25 Feb 2011 10:06:34 -0800 (PST) Received: by gulag1.americas.sgi.com (Postfix, from userid 5508) id 85CE71037A621; Fri, 25 Feb 2011 12:06:34 -0600 (CST) Message-Id: <20110225180634.422972243@gulag1.americas.sgi.com> References: <20110225180633.857892225@gulag1.americas.sgi.com> User-Agent: quilt/0.46-1 Date: Fri, 25 Feb 2011 12:06:37 -0600 From: Mike Travis To: Ingo Molnar Cc: David Rientjes , Jack Steiner , Robin Holt , Len Brown , Thomas Gleixner , "H. Peter Anvin" , Andrew Morton , Yinghai Lu , linux-acpi@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] x86: Minimize SRAT messages Content-Disposition: inline; filename=minimize-srat-msgs.v2 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, 25 Feb 2011 18:07:08 +0000 (UTC) --- linux.orig/arch/x86/mm/srat_64.c +++ linux/arch/x86/mm/srat_64.c @@ -110,6 +110,12 @@ void __init acpi_numa_slit_init(struct a memblock_x86_reserve_range(phys, phys + length, "ACPI SLIT"); } +/* + * Keep track of previous node and PXM values so we can combine + * same ones onto a single line. + */ +static int __initdata last_node = NUMA_NO_NODE, last_pxm = PXM_INVAL; + /* Callback for Proximity Domain -> x2APIC mapping */ void __init acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa) @@ -141,8 +147,17 @@ acpi_numa_x2apic_affinity_init(struct ac set_apicid_to_node(apic_id, node); node_set(node, cpu_nodes_parsed); acpi_numa = 1; - printk(KERN_INFO "SRAT: PXM %u -> APIC 0x%04x -> Node %u\n", - pxm, apic_id, node); + if (node != last_node) { + pr_info("SRAT: Node %u: PXM:APIC %u:0x%x", + node, pxm, apic_id); + last_node = node; + last_pxm = pxm; + } else if (pxm != last_pxm) { + pr_cont(" %u:0x%x", pxm, apic_id); + last_pxm = pxm; + } else { + pr_cont(" :0x%x", apic_id); + } } /* Callback for Proximity Domain -> LAPIC mapping */ --- linux.orig/drivers/acpi/numa.c +++ linux/drivers/acpi/numa.c @@ -286,6 +286,13 @@ 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, 0); + /* + * Parsing ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY entries place + * multiple CPU's on the same Node line. This can leave the + * last entry "dangling" without a newline. Insert it here. + */ + pr_cont("\n"); + acpi_table_parse_srat(ACPI_SRAT_TYPE_CPU_AFFINITY, acpi_parse_processor_affinity, 0); ret = acpi_table_parse_srat(ACPI_SRAT_TYPE_MEMORY_AFFINITY,