From: Mike Travis <travis@sgi.com>
To: David Rientjes <rientjes@google.com>
Cc: Ingo Molnar <mingo@elte.hu>, Jack Steiner <steiner@sgi.com>,
Robin Holt <holt@sgi.com>, Len Brown <len.brown@intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
Andrew Morton <akpm@linux-foundation.org>,
Yinghai Lu <yhlu.kernel@gmail.com>,
linux-acpi@vger.kernel.org, x86@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/6] ACPI: Minimize X2APIC initial messages
Date: Mon, 21 Feb 2011 12:42:11 -0800 [thread overview]
Message-ID: <4D62CE23.1030102@sgi.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1102191637290.27722@chino.kir.corp.google.com>
David Rientjes wrote:
> On Fri, 18 Feb 2011, Mike Travis wrote:
>
>> Minimize X2APIC messages by printing 8 per line and dropping
>> the "enabled" flag since that's assumed. It will still print
>> "disabled" if necessary.
>>
>> v2: updated to apply to x86-tip
>>
>
> For each patch in this series, it would be tremendously helpful to show
> what format the current output is in and what the format is after the
> patch is applied.
Will do. I actually did think about this, as seeing a huge amount
of console output is a relatively rare occurrence... ;-)
>
>> Signed-off-by: Mike Travis <travis@sgi.com>
>> Reviewed-by: Jack Steiner <steiner@sgi.com>
>> Reviewed-by: Robin Holt <holt@sgi.com>
>> ---
>> arch/x86/kernel/acpi/boot.c | 3 +++
>> drivers/acpi/tables.c | 16 +++++++++++-----
>> 2 files changed, 14 insertions(+), 5 deletions(-)
>>
>> --- linux.orig/arch/x86/kernel/acpi/boot.c
>> +++ linux/arch/x86/kernel/acpi/boot.c
>> @@ -903,6 +903,9 @@ static int __init acpi_parse_madt_lapic_
>> if (!count) {
>> x2count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_X2APIC,
>> acpi_parse_x2apic, MAX_LOCAL_APIC);
>> + /* insure trailing newline is output */
>
> s/insure/ensure/
Oops. ;-)
>
>> + pr_cont("\n");
>
> I know that this is the only code that passes ACPI_MADT_TYPE_LOCAL_X2APIC.
> That said, this line really has no place in the caller.
x2apic is probably the only type of system that can grow so large as to
need worrying about overflowing the log buffer. That said, there is
logic in printk() to add a missing '\n'. Should I just rely on that
and leave this out?
>
>> +
>> count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC,
>> acpi_parse_lapic, MAX_LOCAL_APIC);
>> }
>> --- linux.orig/drivers/acpi/tables.c
>> +++ linux/drivers/acpi/tables.c
>> @@ -66,11 +66,17 @@ void acpi_table_print_madt_entry(struct
>> {
>> struct acpi_madt_local_x2apic *p =
>> (struct acpi_madt_local_x2apic *)header;
>> - printk(KERN_INFO PREFIX
>> - "X2APIC (apic_id[0x%02x] uid[0x%02x] %s)\n",
>> - p->local_apic_id, p->uid,
>> - (p->lapic_flags & ACPI_MADT_ENABLED) ?
>> - "enabled" : "disabled");
>> +
>> + if ((p->uid & 7) == 0)
>> + pr_info(PREFIX "X2APIC apic_id=uid:");
>> +
>> + pr_cont(" %02x=%02x%s%s",
>> + p->local_apic_id, p->uid,
>> + /* assume "enabled" unless "disabled" */
>> + (p->lapic_flags & ACPI_MADT_ENABLED) ?
>> + "" : " disabled",
>
> Because you're printing only " disabled" when ACPI_MADT_ENABLED is not
> set, this seems like the format of the line would be ambiguous with regard
> to which entry it applies to. I could imagine a line such as
>
> X2APIC apic_id=uid: 01=01 disabled 02=02
>
> and then we're left wondering which entry is actually disabled. I'd
> prefer "01=01(disabled) 02=02" instead.
Yes, thanks. That does make more sense.
>
> Also, why did you drop the "0x" prefixes from the current format?
With 4096 cores that removes 8k bytes from the log buffer. Do we really
need the 0x everywhere? At what point does the context imply hex?
>
>> + /* nl every 8th item */
>> + (p->uid & 7) == 7 ? "\n" : "");
>> }
>> break;
>>
next prev parent reply other threads:[~2011-02-21 20:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-19 2:47 [PATCH 0/6] init: Shrink early messages to prevent overflowing the kernel log buffer Mike Travis
2011-02-19 2:47 ` [PATCH 1/6] ACPI: Minimize X2APIC initial messages Mike Travis
2011-02-20 1:50 ` David Rientjes
2011-02-21 20:42 ` Mike Travis [this message]
2011-02-22 0:13 ` David Rientjes
2011-02-19 2:47 ` [PATCH 2/6] x86: Minimize initial e820 messages Mike Travis
2011-02-20 1:51 ` David Rientjes
2011-02-21 20:50 ` Mike Travis
2011-02-22 0:13 ` David Rientjes
2011-02-22 18:43 ` Bjorn Helgaas
2011-02-19 2:47 ` [PATCH 3/6] x86: Minimize SRAT messages Mike Travis
2011-02-20 1:51 ` David Rientjes
2011-02-23 21:24 ` Mike Travis
2011-02-24 4:12 ` David Rientjes
2011-02-19 2:47 ` [PATCH 4/6] printk: Break out printk_time Mike Travis
2011-02-20 1:51 ` David Rientjes
2011-02-19 2:47 ` [PATCH 5/6] printk: Minimize time zero output Mike Travis
2011-02-20 1:51 ` David Rientjes
2011-02-21 20:56 ` Mike Travis
2011-02-22 0:13 ` David Rientjes
2011-02-19 2:47 ` [PATCH 6/6] printk: Allocate kernel log buffer earlier Mike Travis
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=4D62CE23.1030102@sgi.com \
--to=travis@sgi.com \
--cc=akpm@linux-foundation.org \
--cc=holt@sgi.com \
--cc=hpa@zytor.com \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rientjes@google.com \
--cc=steiner@sgi.com \
--cc=tglx@linutronix.de \
--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