From: Ingo Molnar <mingo@elte.hu>
To: Mike Travis <travis@sgi.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
Andrew Morton <akpm@linux-foundation.org>,
Len Brown <len.brown@intel.com>,
Yinghai Lu <yhlu.kernel@gmail.com>,
linux-acpi@vger.kernel.org, x86@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] printk: Allocate kernel log buffer earlier
Date: Fri, 18 Feb 2011 08:40:15 +0100 [thread overview]
Message-ID: <20110218074015.GG11404@elte.hu> (raw)
In-Reply-To: <20110217185132.735139933@gulag1.americas.sgi.com>
* Mike Travis <travis@sgi.com> wrote:
> +++ linux/kernel/printk.c
> @@ -162,46 +162,65 @@ void log_buf_kexec_setup(void)
> }
> #endif
>
> +static unsigned long __initdata new_log_buf_len;
> static int __init log_buf_len_setup(char *str)
> {
Can you see the readability problem this new line introduces?
> + char first_line[64], *first_nl;
The value 64 looks arbitrary. Needs to be symbolized and explained. (That would also
make the sizeof(first_line) usage more readable later on.)
> + pr_info("log_buf_len: %d, first line: %s\n",
> + log_buf_len, first_line);
It's not just arbitrarily sized, but i dont see where it's guaranteed that it's a
nil delimited string.
> + pr_debug("bu: %d/%d (%d%%)\n",
> + dest_idx, __LOG_BUF_LEN - dest_idx,
> + (dest_idx * 100) / __LOG_BUF_LEN);
What's that?
Patch looks pretty ad-hoc. No comments whatsoever what the intention is either, so
the reader has to go figure out the code.
Thanks,
Ingo
prev parent reply other threads:[~2011-02-18 7:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-17 18:51 [PATCH 0/5] init: Shrink early messages to prevent overflowing the kernel log buffer Mike Travis
2011-02-17 18:51 ` [PATCH 1/5] ACPI: Minimize X2APIC initial messages Mike Travis
2011-02-18 7:28 ` Ingo Molnar
2011-02-17 18:51 ` [PATCH 2/5] x86: Minimize initial e820 messages Mike Travis
2011-02-18 7:30 ` Ingo Molnar
2011-02-17 18:51 ` [PATCH 3/5] x86: Minimize SRAT messages Mike Travis
2011-02-18 7:32 ` Ingo Molnar
2011-02-17 18:51 ` [PATCH 4/5] printk: Minimize time zero output Mike Travis
2011-02-18 7:34 ` Ingo Molnar
2011-02-17 18:51 ` [PATCH 5/5] printk: Allocate kernel log buffer earlier Mike Travis
2011-02-17 23:21 ` Yinghai Lu
2011-02-17 23:52 ` Mike Travis
2011-02-18 7:40 ` Ingo Molnar [this message]
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=20110218074015.GG11404@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--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