From: Greg KH <gregkh@suse.de>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Phil Carmody <ext-phil.2.carmody@nokia.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCHv3 1/1] sysfs: add more info to the oops dump
Date: Thu, 10 Mar 2011 15:03:04 -0800 [thread overview]
Message-ID: <20110310230304.GA5254@suse.de> (raw)
In-Reply-To: <alpine.LFD.2.00.1103102354530.2787@localhost6.localdomain6>
On Thu, Mar 10, 2011 at 11:59:26PM +0100, Thomas Gleixner wrote:
> On Thu, 10 Mar 2011, Andrew Morton wrote:
>
> > On Fri, 11 Mar 2011 00:27:07 +0200
> > Phil Carmody <ext-phil.2.carmody@nokia.com> wrote:
> >
> > > +static int last_sysfs_write_len;
> > > void sysfs_printk_last_file(void)
> > > {
> > > - printk(KERN_EMERG "last sysfs file: %s\n", last_sysfs_file);
> > > + printk(KERN_EMERG "last sysfs file (%c): %s%c",
> > > + (last_sysfs_write_len == SYSFS_NOT_A_WRITE) ? 'r' : 'w',
> > > + last_sysfs_file,
> > > + last_sysfs_write_len > 0 ? ' ' : '\n');
> > > + if (last_sysfs_write_len >= (int)sizeof(last_sysfs_write))
> > > + printk(KERN_CONT " written: %s...(%d chars)\n",
> > > + last_sysfs_write, last_sysfs_write_len);
> > > + else if (last_sysfs_write_len > 0)
> > > + printk(KERN_CONT " written: %s\n", last_sysfs_write);
> > > }
> >
> > That's going to fail to emit the \n if last_sysfs_write_len<=0.
> > However there are tricks inside printk() which will fix that up if the
> > next printk starts with KERN_foo.
> >
> >
> >
> > I can recall just one instance in the past 5-6 years in which the
> > last-sysfs-file output enabled me to locate a bug which would otherwise
> > have been unlocatable (within a drivers/md handler, iirc).
> >
> > I don't think it's a terribly useful feature. Except for when it _is_
> > useful, when it's very useful ;) The world wouldn't end if we decided
> > to remove it.
>
> Amen to that.
>
> It's more of an distraction than anything which is relevant to 99.999%
> of the problems we have to deal with.
Ok, I think I'll delete it as I'm tired of having to filter it out of my
"any problem with sysfs" lkml filter that I use :)
thanks,
greg k-h
next prev parent reply other threads:[~2011-03-10 23:04 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-10 15:53 [PATCH 1/1] sysfs: add more info to the oops dump Phil Carmody
2011-03-10 16:25 ` Greg KH
2011-03-10 18:32 ` Phil Carmody
2011-03-10 19:02 ` Greg KH
2011-03-10 21:10 ` Phil Carmody
2011-03-10 21:27 ` Greg KH
2011-03-10 22:27 ` [PATCHv3 0/1] " Phil Carmody
2011-03-10 22:27 ` [PATCHv3 1/1] " Phil Carmody
2011-03-10 22:38 ` Andrew Morton
2011-03-10 22:59 ` Thomas Gleixner
2011-03-10 23:03 ` Greg KH [this message]
2011-03-10 23:15 ` Andrew Morton
2011-03-10 23:06 ` Phil Carmody
2011-03-10 23:13 ` Thomas Gleixner
2011-03-10 23:22 ` Andrew Morton
2011-03-10 23:27 ` Thomas Gleixner
2011-03-10 23:46 ` Thomas Gleixner
2011-03-10 23:22 ` Phil Carmody
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=20110310230304.GA5254@suse.de \
--to=gregkh@suse.de \
--cc=akpm@linux-foundation.org \
--cc=ext-phil.2.carmody@nokia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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