From: Borislav Petkov <bp@suse.de>
To: Alexander Kuleshov <kuleshovmail@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
LKML <linux-kernel@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mark Rustad <mark.d.rustad@intel.com>,
Yinghai Lu <yinghai@kernel.org>
Subject: Re: [PATCH v11 3/5] x86/earlyprintk: Allocate early log_buf as early as possible
Date: Wed, 10 Jun 2015 11:04:20 +0200 [thread overview]
Message-ID: <20150610090420.GA24882@pd.tnic> (raw)
In-Reply-To: <CANCZXo4zoxc9273wJk+V+9JfxnJNnNCuwguhzxTJZSd9i=FTaQ@mail.gmail.com>
On Tue, Jun 09, 2015 at 11:37:27PM +0600, Alexander Kuleshov wrote:
> Borislav, I'm really not sure too, that using of printk to update
> log_buf with the earlyprintk is a right correct here.
Yes, so this whole approach and what you're trying to achieve
seems kinda confusing and wrong. First of all, the early_printk()
machinery prints to a special console driver, i.e., I'm looking at the
registration fun in setup_early_printk().
So using early_printk() to print to dmesg is the wrong tool for the
job. Actually, if you want to do that, you can just as well use plain
printk() and try to make it work much earlier. Which is basically what
you did by using the printk_func per_cpu ptr, but that was hacky and
ugly.
In order to do that right, you need to slow down first, think hard
and look hard and long at printk(), log_buf, the statically allocated
smaller __log_buf and the whole machinery behind it. Whether it can be
used that early or not. And to explain why it can or why it cannot in
your commit messages. Then test your stuff a *lot* on the hw you have
access to because printk() is not a joke. It needs to be very reliable
and to work.
If you don't do your homework and expect other people to do it, you will
have a lot less success with your patches.
I sincerely hope that helps.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--
next prev parent reply other threads:[~2015-06-10 9:04 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-09 11:10 [PATCH v11 0/5] x86/earlyprintk: setup serial earlyprintk as early as possible Alexander Kuleshov
2015-06-09 11:11 ` [PATCH v11 1/5] x86/setup: introduce setup_bultin_cmdline Alexander Kuleshov
2015-06-09 15:32 ` Andy Shevchenko
2015-06-09 11:11 ` [PATCH v11 2/5] x86/setup: handle builtin command line as early as possible Alexander Kuleshov
2015-06-09 11:11 ` [PATCH v11 3/5] x86/earlyprintk: Allocate early log_buf " Alexander Kuleshov
2015-06-09 15:58 ` Andy Shevchenko
2015-06-09 16:07 ` Borislav Petkov
2015-06-09 17:37 ` Alexander Kuleshov
2015-06-10 9:04 ` Borislav Petkov [this message]
2015-06-10 9:25 ` Alexander Kuleshov
2015-06-09 11:11 ` [PATCH v11 4/5] x86/earlyprintk: setup earlyprintk " Alexander Kuleshov
2015-06-09 17:00 ` Andy Shevchenko
2015-06-09 18:00 ` Alexander Kuleshov
2015-06-10 9:44 ` Andy Shevchenko
2015-06-10 10:36 ` Alexander Kuleshov
2015-06-10 10:41 ` Alexander Kuleshov
2015-06-09 11:11 ` [PATCH v11 5/5] x86/earlyprintk: Patch for testing earlyprintk Alexander Kuleshov
2015-06-09 15:30 ` Andy Shevchenko
2015-06-09 16:11 ` Borislav Petkov
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=20150610090420.GA24882@pd.tnic \
--to=bp@suse.de \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=kuleshovmail@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.d.rustad@intel.com \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=yinghai@kernel.org \
/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