From: Andrew Morton <akpm@linux-foundation.org>
To: Kay Sievers <kay@vrfy.org>
Cc: Joe Perches <joe@perches.com>,
linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Len Brown <lenb@kernel.org>
Subject: Re: [PATCH] printk(): add KERN_CONT where needed
Date: Mon, 9 Apr 2012 16:08:03 -0700 [thread overview]
Message-ID: <20120409160803.27bc1376.akpm@linux-foundation.org> (raw)
In-Reply-To: <CAPXgP12jX37GLgMJQuDYEi6q5A2Ma3d+e+_sNkFVdYfwsdMrtQ@mail.gmail.com>
On Tue, 3 Apr 2012 05:00:10 +0200
Kay Sievers <kay@vrfy.org> wrote:
> > Maybe it'd be better to aggregate content rather like
> > printk does. __Aggregate until you get a newline or a
> > new KERN_<LEVEL>
>
> The continuation printk() can can always go wrong when multiple
> threads do that in parallel. We can try to make it better with a
> per-cpu buffer, but I guess there will always be a situation where
> this can happen.
Maybe we can be a bit smarter. For example, if `current' is unchanged
and __builtin_return_address(0) is unchanged, keep on buffering.
It's all a bit hacky, but weeding out all those thousands of printks
which never get printed anyway doesn't sound much fun either.
> - printk(")");
> + printk(KERN_CONT ")");
And I do think we should avoid doing it that way, if only because it
consumes 10 display columns and makes a mess. Maybe use pr_cont()?
But that implies that the affected code is using the pr_foo()
facilities, and a lot of it doesn't. So maybe a new macro.
All a bit of a pain.
next prev parent reply other threads:[~2012-04-09 23:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-03 1:18 [PATCH] printk(): add KERN_CONT where needed Kay Sievers
2012-04-03 2:36 ` Joe Perches
2012-04-03 3:00 ` Kay Sievers
2012-04-03 3:03 ` Joe Perches
2012-04-03 3:47 ` Joe Perches
2012-04-03 10:30 ` Kay Sievers
2012-04-03 14:32 ` Joe Perches
2012-04-03 15:50 ` Kay Sievers
2012-04-03 16:05 ` Joe Perches
2012-04-03 16:11 ` Kay Sievers
2012-04-03 16:16 ` Joe Perches
2012-04-03 16:20 ` Kay Sievers
2012-04-03 16:27 ` Joe Perches
2012-04-09 23:08 ` Andrew Morton [this message]
2012-04-09 23:37 ` Joe Perches
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=20120409160803.27bc1376.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--cc=kay@vrfy.org \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.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;
as well as URLs for NNTP newsgroup(s).