mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Kay Sievers <kay@vrfy.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: pr_cat() + CATSTR(name, size)?
Date: Wed, 11 Jul 2012 08:30:47 -0700	[thread overview]
Message-ID: <1342020647.13724.71.camel@joe2Laptop> (raw)
In-Reply-To: <CAPXgP11XnrFayb-g5HFu3wPtw8=xLfSY7HNCCbiSoehj8KsGcw@mail.gmail.com>

On Wed, 2012-07-11 at 17:14 +0200, Kay Sievers wrote:
> On Wed, Jul 11, 2012 at 5:01 PM, Joe Perches <joe@perches.com> wrote:
[]
> There are _many_ cases the console lock is held, and we don't print
> stuff immediately out to the console, and we never ensured that in the
> past. There was never a guarantee that stuff ended up on the console,
> kmsg was always and needs to be a store+forward model.

I'm less concerned with kmsg than you.
I think it's more a nicety than anything.

> > It would require all sites with continuation lines
> > be modified.  Because it requires in-situ code
> > modifications, I'd prefer a cookie based approach.
> 
> Well, it would be mostly for the dev_printk() stuff, which should
> ideally never be merged with stuff that could go wrong.

Perhaps that's ideal, but not practical.
printk continuations are more prevalent.

> > I think it's more flexible, allows the cookie to be
> > passed into extending functions and doesn't demand
> > (much) extra stack.
> >
> > Something like:
> > https://lkml.org/lkml/2012/4/3/231
> > https://lkml.org/lkml/2011/11/14/349
> 
> Hmm, how do we manage memory allocations here? We can get around that
> somehow? It's something the common printk() must really avoid.

Well, I think the malloc costs are pretty low
and could devolve pretty easily when OOM.

cookie=NULL, directly emit.

Anyway, interesting idea, keep at it, see what
comes out of it.

cheers, Joe


  reply	other threads:[~2012-07-11 15:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-11 10:33 Kay Sievers
2012-07-11 11:38 ` Kay Sievers
2012-07-11 15:01 ` Joe Perches
2012-07-11 15:14   ` Kay Sievers
2012-07-11 15:30     ` Joe Perches [this message]
2012-07-11 15:48       ` Kay Sievers
2012-07-11 16:55         ` Joe Perches
2012-07-11 17:25           ` Kay Sievers
2012-07-11 17:51             ` Joe Perches
2012-07-12 12:04               ` Kay Sievers

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=1342020647.13724.71.camel@joe2Laptop \
    --to=joe@perches.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kay@vrfy.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

Powered by JetHome