All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Nick Andrew <nick@nick-andrew.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Takashi Iwai <tiwai@suse.de>
Subject: Re: [RFC] Recursive printk
Date: Mon, 08 Dec 2008 10:42:08 +0900	[thread overview]
Message-ID: <493C7B70.4090307@kernel.org> (raw)
In-Reply-To: <20081206083030.GF5957@mail.local.tull.net>

Hello,

Nick Andrew wrote:
>> Tejun had a thing a while ago which was kinda intended to solve the
>> same problem.  iirc his approach added a lot more code (bad), but
>> didn't go and add strange new semantics to printk.
> 
> I'm not trying to solve a huge problem (e.g. as Jason Baron's dynamic
> debug does), just a small problem. Why do tasks have to choose
> between double-buffering their messages and making multiple calls
> to printk?

Yeah, my patch happened to solve about the same problem (and mprintk
proper was ~370 lines, so it wasn't too bad).  Mine went the way of
assembling messages piece-by-piece and most of the complexities came
from buffer management and fallback (e.g. even if kmalloc fails to
allocate messages, messages still get printed out, albeit a bit
uglier).

>> IOW, for this to be halfway as useful as you expect, we need a
>> look-out-for-local-printk-hacks maintainer.
> 
> If my patch makes it in, it will be followed by fixes to all
> those local hacks. We might discover some common element so they
> can be made non-local. Once a better way to interface to printk
> becomes prevalent, it will probably be reused. And if it's not,
> then it affects only the one subsystem.

No matter which mechanism, I'd love to have something to solve this in
kernel.  I face this problem quite often and each and every time I
have to come up with some custom hack to work around it.

FWIW, this was the last take of the mprintk patchset.

  http://thread.gmane.org/gmane.linux.ide/28415

Thanks.

-- 
tejun

      reply	other threads:[~2008-12-08  1:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-06  6:59 [RFC] Recursive printk Nick Andrew
2008-12-06  6:59 ` [RFC PATCH v1 1/3] Split the vsnprintf function into two parts Nick Andrew
2008-12-06  7:00 ` [RFC PATCH v1 2/3] Add %v support to vsnprintf() Nick Andrew
2008-12-06 17:27   ` Linus Torvalds
2008-12-06  7:00 ` [RFC PATCH v1 3/3] Sample refactor of socket.c to use recursive printk Nick Andrew
2008-12-06  7:03   ` David Miller
2008-12-06  7:18   ` Valdis.Kletnieks
2008-12-06  7:40     ` Nick Andrew
2008-12-06  7:20 ` [RFC] Recursive printk Andrew Morton
2008-12-06  7:33   ` Willy Tarreau
2008-12-06  7:41     ` Andrew Morton
2008-12-06  8:16       ` Willy Tarreau
2008-12-06  9:43       ` Takashi Iwai
2008-12-06  7:42   ` Joe Perches
2008-12-06  8:40     ` Nick Andrew
2008-12-06  9:11       ` Joe Perches
2008-12-06 23:16         ` Nick Andrew
2008-12-06 23:24           ` Linus Torvalds
2008-12-06 19:35       ` Al Viro
2008-12-06  8:30   ` Nick Andrew
2008-12-08  1:42     ` Tejun Heo [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=493C7B70.4090307@kernel.org \
    --to=tj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nick@nick-andrew.net \
    --cc=tiwai@suse.de \
    --cc=torvalds@linux-foundation.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 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.