From patchwork Thu Feb 17 18:51:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Travis X-Patchwork-Id: 571571 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 p1HIqLCw004522 for ; Thu, 17 Feb 2011 18:52:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932268Ab1BQSvi (ORCPT ); Thu, 17 Feb 2011 13:51:38 -0500 Received: from relay1.sgi.com ([192.48.179.29]:39366 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757104Ab1BQSvg (ORCPT ); Thu, 17 Feb 2011 13:51:36 -0500 Received: from gulag1.americas.sgi.com (gulag1.americas.sgi.com [128.162.236.41]) by relay1.corp.sgi.com (Postfix) with ESMTP id A8E9B8F80B8; Thu, 17 Feb 2011 10:51:32 -0800 (PST) Received: by gulag1.americas.sgi.com (Postfix, from userid 5508) id 8A6C61037A4EC; Thu, 17 Feb 2011 12:51:32 -0600 (CST) Message-Id: <20110217185132.417819224@gulag1.americas.sgi.com> References: <20110217185131.960038922@gulag1.americas.sgi.com> User-Agent: quilt/0.46-1 Date: Thu, 17 Feb 2011 12:51:34 -0600 From: Mike Travis To: Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" Cc: Andrew Morton , Len Brown , Yinghai Lu , linux-acpi@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/5] 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]); Thu, 17 Feb 2011 18:52:22 +0000 (UTC) --- linux.orig/arch/x86/mm/srat_64.c +++ linux/arch/x86/mm/srat_64.c @@ -116,6 +116,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; @@ -141,8 +142,16 @@ 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:%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 */ @@ -301,8 +310,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); if (ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE) { update_nodes_add(node, start, end); --- linux.orig/drivers/acpi/numa.c +++ linux/drivers/acpi/numa.c @@ -286,6 +286,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, 0); + /* insure trailing newline is output */ + 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,