Re: [PATCH 3/8] SGI x86_64 UV: Limit the number of number of SRATmessages

From: Mike Travis
Date: Tue Oct 27 2009 - 11:24:49 EST




Andi Kleen wrote:
Mike Travis <travis@xxxxxxx> writes:

Limit number of SRAT messages of the form:
[ 0.000000] SRAT: PXM 0 -> APIC 0 -> Node 0

While I generally agree on the concept of limiting per CPU information
(see other mail) I don't think removing this message by default is a good idea. I regularly needed it for debugging some NUMA related
problems and they still happen moderately often even today.

I think the right approach here, to limit output, would be to figure out
a more compact output format, perhaps using a matrix in a table
or simply printing multiple pair per line.

-Andi


In this approach, I only print the first SRAT of each node... Is
this closer to what you're looking for?

Thanks,
Mike

SGI x86_64 UV: Limit the number of number of SRAT messages

Limit number of SRAT messages of the form:

[ 0.000000] SRAT: PXM 0 -> APIC 0 -> Node 0

Cc: H. Peter Anvin <hpa@xxxxxxxxx>
Cc: x86@xxxxxxxxxx
Cc: David Rientjes <rientjes@xxxxxxxxxx>
Cc: Yinghai Lu <yinghai@xxxxxxxxxx>
Cc: Mel Gorman <mel@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
Signed-off-by: Mike Travis <travis@xxxxxxx>
---
arch/x86/mm/srat_64.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)

--- linux.orig/arch/x86/mm/srat_64.c
+++ linux/arch/x86/mm/srat_64.c
@@ -115,6 +115,7 @@
{
int pxm, node;
int apic_id;
+ static int last_node = -1;

if (srat_disabled())
return;
@@ -136,8 +137,11 @@
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) {
+ printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n",
+ pxm, apic_id, node);
+ last_node = node;
+ }
}

/* Callback for Proximity Domain -> LAPIC mapping */
@@ -146,6 +150,7 @@
{
int pxm, node;
int apic_id;
+ static int last_node = -1;

if (srat_disabled())
return;
@@ -170,8 +175,11 @@
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) {
+ printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n",
+ pxm, apic_id, node);
+ last_node = node;
+ }
}

#ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/