From: Ingo Molnar <mingo@elte.hu>
To: David Rientjes <rientjes@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Andrew Morton <akpm@linux-foundation.org>,
Mike Travis <travis@sgi.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Roland Dreier <rdreier@cisco.com>,
Randy Dunlap <rdunlap@xenotime.net>, Tejun Heo <tj@kernel.org>,
Andi Kleen <andi@firstfloor.org>,
Greg Kroah-Hartman <gregkh@suse.de>,
Yinghai Lu <yhlu.kernel@gmail.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Steven Rostedt <rostedt@goodmis.org>,
Rusty Russell <rusty@rustcorp.com.au>,
Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>,
Jack Steiner <steiner@sgi.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [patch] x86: reduce srat verbosity in the kernel log
Date: Fri, 13 Nov 2009 10:53:50 +0100 [thread overview]
Message-ID: <20091113095350.GC1364@elte.hu> (raw)
In-Reply-To: <alpine.DEB.2.00.0911121247420.9544@chino.kir.corp.google.com>
* David Rientjes <rientjes@google.com> wrote:
> It's possible to reduce the number of SRAT messages emitted to the kernel
> log by printing each valid pxm once and then creating bitmaps to represent
> the apic ids that map to the same node.
>
> This reduces lines such as
>
> SRAT: PXM 0 -> APIC 0 -> Node 0
> SRAT: PXM 0 -> APIC 1 -> Node 0
> SRAT: PXM 1 -> APIC 2 -> Node 1
> SRAT: PXM 1 -> APIC 3 -> Node 1
>
> to
>
> SRAT: PXM 0 -> APIC {0-1} -> Node 0
> SRAT: PXM 1 -> APIC {2-3} -> Node 1
>
> The buffer used to store the apic id list is 128 characters in length.
> If that is too small to represent all the apic id ranges that are bound
> to a single pxm, a trailing "..." is added. APICID_LIST_LEN should be
> manually increased for such configurations.
>
> Acked-by: Mike Travis <travis@sgi.com>
> Signed-off-by: David Rientjes <rientjes@google.com>
> ---
> arch/x86/mm/srat_64.c | 41 +++++++++++++++++++++++++++++++++++++----
> drivers/acpi/numa.c | 5 +++++
> include/linux/acpi.h | 3 ++-
> 3 files changed, 44 insertions(+), 5 deletions(-)
>
> diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c
> --- a/arch/x86/mm/srat_64.c
> +++ b/arch/x86/mm/srat_64.c
> @@ -36,6 +36,9 @@ static int num_node_memblks __initdata;
> static struct bootnode node_memblk_range[NR_NODE_MEMBLKS] __initdata;
> static int memblk_nodeid[NR_NODE_MEMBLKS] __initdata;
>
> +static DECLARE_BITMAP(apicid_map, MAX_LOCAL_APIC) __initdata;
> +#define APICID_LIST_LEN (128)
> +
> static __init int setup_node(int pxm)
> {
> return acpi_map_pxm_to_node(pxm);
> @@ -136,8 +139,6 @@ acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa)
> 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);
> }
>
> /* Callback for Proximity Domain -> LAPIC mapping */
> @@ -170,8 +171,40 @@ acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa)
> 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);
> +}
> +
> +void __init acpi_numa_print_srat_mapping(void)
> +{
> + char apicid_list[APICID_LIST_LEN];
> + int i, j;
> +
> + for (i = 0; i < MAX_PXM_DOMAINS; i++) {
> + int len;
> + int nid;
> +
> + nid = pxm_to_node(i);
> + if (nid == NUMA_NO_NODE)
> + continue;
> +
> + bitmap_zero(apicid_map, MAX_LOCAL_APIC);
> + for (j = 0; j < MAX_LOCAL_APIC; j++)
> + if (apicid_to_node[j] == nid)
> + set_bit(j, apicid_map);
> +
> + if (bitmap_empty(apicid_map, MAX_LOCAL_APIC))
> + continue;
> +
> + /*
> + * If the bitmap cannot be listed in a buffer of length
> + * APICID_LIST_LEN, then it is suffixed with "...".
> + */
> + len = bitmap_scnlistprintf(apicid_list, APICID_LIST_LEN,
> + apicid_map, MAX_LOCAL_APIC);
> + pr_info("SRAT: PXM %u -> APIC {%s%s} -> Node %u\n",
> + i, apicid_list,
> + (len == APICID_LIST_LEN - 1) ? "..." : "",
> + nid);
> + }
> }
No. As i suggested many times before, just get rid of the printouts or
make them boot-debug-flag dependent.
Ingo
next prev parent reply other threads:[~2009-11-13 9:54 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-12 17:19 [PATCH 0/7] Limit console output by suppressing repetitious messages Mike Travis
2009-11-12 17:19 ` [PATCH 1/7] x86: Limit the number of processor bootup messages Mike Travis
2009-11-12 18:09 ` Ingo Molnar
2009-11-12 20:05 ` Mike Travis
2009-11-13 9:52 ` Ingo Molnar
2009-11-13 13:43 ` Mike Travis
2009-11-12 22:10 ` Yinghai Lu
2009-11-13 13:46 ` Mike Travis
2009-11-13 21:58 ` Yinghai Lu
2009-11-12 17:19 ` [PATCH 2/7] ACPI: Limit the number of per cpu ACPI " Mike Travis
2009-11-12 21:02 ` David Rientjes
2009-11-12 21:19 ` Mike Travis
2009-11-12 21:28 ` David Rientjes
2009-11-13 13:53 ` Mike Travis
2009-11-12 17:19 ` [PATCH 3/7] INIT: Limit the number of per cpu INIT " Mike Travis
2009-11-12 21:06 ` David Rientjes
2009-11-12 21:20 ` Mike Travis
2009-11-12 17:19 ` [PATCH 4/7] firmware: Limit the number of per cpu firmware messages during bootup Mike Travis
2009-11-12 17:19 ` [PATCH 5/7] x86: Limit the number of per cpu MCE bootup messages Mike Travis
2009-11-12 17:19 ` [PATCH 6/7] sched: Limit the number of scheduler debug messages Mike Travis
2009-11-12 17:19 ` [PATCH 7/7] x86: Limit number of per cpu TSC sync messages Mike Travis
2009-11-12 20:48 ` [patch] x86: reduce srat verbosity in the kernel log David Rientjes
2009-11-13 9:53 ` Ingo Molnar [this message]
2009-11-13 10:02 ` David Rientjes
2009-11-13 10:13 ` Ingo Molnar
2009-11-13 10:29 ` David Rientjes
2009-11-13 10:57 ` Ingo Molnar
2009-11-20 18:37 ` Pavel Machek
2009-11-20 18:58 ` Mike Travis
2009-11-12 22:16 ` [PATCH 0/7] Limit console output by suppressing repetitious messages Yinghai Lu
[not found] <20091023233743.439628000@alcatraz.americas.sgi.com>
2009-10-23 23:37 ` [PATCH 3/8] SGI x86_64 UV: Limit the number of number of SRAT messages Mike Travis
2009-10-26 7:04 ` Andi Kleen
2009-10-27 15:24 ` Mike Travis
2009-10-27 19:45 ` David Rientjes
2009-10-27 20:00 ` Mike Travis
2009-10-27 20:25 ` [patch] x86: reduce srat verbosity in the kernel log David Rientjes
2009-10-27 20:42 ` Mike Travis
2009-10-27 20:48 ` David Rientjes
2009-10-27 23:02 ` Mike Travis
2009-10-28 3:29 ` Andi Kleen
2009-10-28 4:08 ` David Rientjes
2009-10-28 3:53 ` Yinghai Lu
2009-10-28 4:08 ` David Rientjes
2009-10-27 20:55 ` Cyrill Gorcunov
2009-10-27 21:06 ` David Rientjes
2009-10-27 21:10 ` Cyrill Gorcunov
2009-10-28 3:32 ` Andi Kleen
2009-10-28 4:08 ` David Rientjes
2009-10-28 4:11 ` Andi Kleen
2009-10-28 17:02 ` Mike Travis
2009-10-28 20:52 ` David Rientjes
2009-10-28 21:03 ` Mike Travis
2009-10-28 21:06 ` David Rientjes
2009-10-28 21:35 ` Mike Travis
2009-10-28 21:46 ` David Rientjes
2009-10-28 22:36 ` Mike Travis
2009-10-29 8:21 ` David Rientjes
2009-10-29 16:34 ` Mike Travis
2009-10-29 19:06 ` David Rientjes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091113095350.GC1364@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=fweisbec@gmail.com \
--cc=gregkh@suse.de \
--cc=heiko.carstens@de.ibm.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rdreier@cisco.com \
--cc=rdunlap@xenotime.net \
--cc=rientjes@google.com \
--cc=rostedt@goodmis.org \
--cc=rusty@rustcorp.com.au \
--cc=seto.hidetoshi@jp.fujitsu.com \
--cc=steiner@sgi.com \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=travis@sgi.com \
--cc=x86@kernel.org \
--cc=yhlu.kernel@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox