public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Jiri Kosina <jkosina@suse.cz>
Cc: Kay Sievers <kay@vrfy.org>,
	linux-kernel@vger.kernel.org,
	Greg Kroah-Hartmann <greg@kroah.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH] printk: support structured and multi-facility log messages
Date: Fri, 06 Apr 2012 18:51:11 -0700	[thread overview]
Message-ID: <1333763471.8565.32.camel@joe2Laptop> (raw)
In-Reply-To: <alpine.LNX.2.00.1204070303370.24006@pobox.suse.cz>

On Sat, 2012-04-07 at 03:14 +0200, Jiri Kosina wrote:
> On Fri, 6 Apr 2012, Joe Perches wrote:
> 
> > > > - Output of dev_printk() is reliably machine-readable now. In addition
> > > >   to the printed plain text message, it creates a log dictionary with the
> > > >   following properties:
> > > >     SUBSYSTEM=     - the driver-core subsytem name
> > > >     DEVICE=
> > > >       b12:8        - block dev_t
> > > >       c127:3       - char dev_t
> > > >       n8           - netdev ifindex
> > > >       +sound:card0 - subsystem:devname
> > > 
> > > One of the questions that hasn't been raised yet, and which I personally 
> > > consider crucial -- are we making printk() interface part of userspace ABI 
> > > now by this?
> > 
> > I hope not.
> 
> And how exactly do we prevent that? It's a systematic and well-defined 
> interface between kernel and userspace, and as such it's hard to not 
> consider it to be ABI.
> 
> > > Today, we are free to change any printk()s and not feel guilty about it at 
> > > all. With this, we are making the whole thing much more systematic and 
> > > friendly for automatic userspace consumption.
> > 
> > It _may_ be that new KEYWORD=VALUE combinations may become systematic 
> > and an ABI, but the content of the message is still arbitrary and should 
> > be designated as changeable without notice.
> 
> I bet there would be "you broke my userspace app because it was depending 
> on the printk() you just removed" bugreport coming from someone very soon. 
> 
> We can then either start explaining why this structured and well-defined 
> printk() is not ABI, or just don't allow for that to happen in the first 
> place by keeping printk() what it has always been -- unstructured linear 
> flow of log entries destined only to be read by humans.

I think the commit log is poor.

printk() is effectively unmodified.

Generic helpers like dev_printk() can have an extra bit
prepended in the form of device/class/name.

All dev_printk device/class/name does is show what device
emitted a message.  It doesn't limit the message content.
The content of the message after that device/class/name
is still arbitrary.

No other use has been proposed, that's why I think it's
not all that valuable (yet?).

I do think that printk_emit, which I think is a bad name,
( maybe printk_tva() or printk_desc() ) has some value.

The record oriented change also has value as it can more
easily be optionally extended to compress/decompress the
text message to save memory space per record.  Of course
that'd only be valuable when CONFIG_LOG_BUF_SHIFT is
large enough to gain something by using compression.



      reply	other threads:[~2012-04-07  1:51 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-04 19:59 [PATCH] printk: support structured and multi-facility log messages Kay Sievers
2012-04-04 21:05 ` Greg Kroah-Hartmann
2012-04-04 21:14   ` Kay Sievers
2012-04-05  0:31     ` Greg Kroah-Hartmann
2012-04-04 21:16   ` richard -rw- weinberger
2012-04-04 21:20     ` Kay Sievers
2012-04-04 23:51 ` Joe Perches
2012-04-05  0:33   ` Greg Kroah-Hartmann
2012-04-05  0:40     ` Joe Perches
2012-04-05  7:46       ` Kay Sievers
2012-04-05  8:08         ` Sam Ravnborg
2012-04-05  8:35           ` Kay Sievers
2012-04-05 11:44             ` Joe Perches
2012-04-05  8:38 ` Joe Perches
2012-04-05  8:44   ` Kay Sievers
2012-04-05 15:05 ` Ingo Molnar
2012-04-05 15:25   ` Kay Sievers
2012-04-05 17:18     ` Ingo Molnar
2012-04-05 17:09 ` Linus Torvalds
2012-04-05 17:53   ` Linus Torvalds
2012-04-13 13:42     ` Stijn Devriendt
2012-04-05 19:47   ` Kay Sievers
2012-04-06  1:12     ` Joe Perches
2012-04-06  1:31       ` Linus Torvalds
2012-04-06  3:43         ` Joe Perches
2012-04-06 18:35         ` Kay Sievers
2012-04-08  0:47           ` Joe Perches
2012-04-08  1:02           ` Joe Perches
2012-04-10 17:21             ` Joe Perches
2012-04-11 11:39     ` Eric W. Biederman
2012-04-07  0:26 ` Jiri Kosina
2012-04-07  0:59   ` Joe Perches
2012-04-07  1:14     ` Jiri Kosina
2012-04-07  1:51       ` Joe Perches [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=1333763471.8565.32.camel@joe2Laptop \
    --to=joe@perches.com \
    --cc=greg@kroah.com \
    --cc=jkosina@suse.cz \
    --cc=kay@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox