All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: "Huang, Ying" <ying.huang@intel.com>, Len Brown <lenb@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Andi Kleen <andi@firstfloor.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH -v2 2/3] ACPI, APEI, Add APEI generic error status print support
Date: Tue, 30 Nov 2010 10:17:44 -0800	[thread overview]
Message-ID: <20101130101744.17efdea4.akpm@linux-foundation.org> (raw)
In-Reply-To: <987664A83D2D224EAE907B061CE93D530191E8BCF1@orsmsx505.amr.corp.intel.com>

On Tue, 30 Nov 2010 10:00:47 -0800 "Luck, Tony" <tony.luck@intel.com> wrote:

> > +	for (i = 0; i < strs_size; i++) {
> > +		if (!(bits & (1U << i)))
> > +			continue;
> > +		str = strs[i];
> > +		if (len && len + strlen(str) + 2 > 80) {
> > +			printk("\n");
> > +			len = 0;
> > +		}
> > +		if (!len)
> > +			len = pr_pfx(pfx, "%s", str);
> > +		else
> > +			len += printk(", %s", str);
> > +	}
> > +	if (len)
> > +		printk("\n");
> 
> Does printk() offer any guarantees about getting all the characters
> from a single printk() call out to the console without interleaving
> with messages from printk() calls on other cpus?

Yes, it uses logbuf_lock to atomically append all the output from a
printk into log_buf[].  Then it calls the console drivers against
log_buf[].  It's hard to see how a console driver could then screw that
up.

>  If it does, then
> it would be a good idea to sprintf() the parts of this message to
> a buffer and then use one printk() call.

yup.

>  I think I read that netconsole
> ends up with one packet on the wire for each call to printk().
> 
> Trying to parse output jumbled together from multiple cpus
> doesn't sound like fun.
> 
> -Tony

  reply	other threads:[~2010-11-30 18:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-30  2:51 [PATCH -v2 0/3] Report APEI GHES error information via printk Huang Ying
2010-11-30  2:51 ` [PATCH -v2 1/3] Add CPER PCIe error section structure and constants definition Huang Ying
2010-11-30  2:51 ` [PATCH -v2 2/3] ACPI, APEI, Add APEI generic error status print support Huang Ying
2010-11-30  3:03   ` Andrew Morton
2010-11-30  3:29     ` Huang Ying
2010-11-30  3:40       ` Andrew Morton
2010-11-30  7:00         ` Huang Ying
2010-11-30 23:49           ` Andrew Morton
2010-12-01  0:04             ` huang ying
2010-12-01  0:04               ` huang ying
2010-11-30 18:00     ` Luck, Tony
2010-11-30 18:17       ` Andrew Morton [this message]
2010-11-30 23:56       ` huang ying
2010-11-30 23:56         ` huang ying
2010-11-30  2:51 ` [PATCH -v2 3/3] ACPI, APEI, report GHES error information via printk Huang Ying
2010-11-30  3:07   ` Andrew Morton
2010-11-30  3:35     ` Huang Ying
2010-11-30  5:47       ` KOSAKI Motohiro
2010-11-30  6:20         ` Huang Ying

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=20101130101744.17efdea4.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=tony.luck@intel.com \
    --cc=torvalds@linux-foundation.org \
    --cc=ying.huang@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.