All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <rpurdie@openedhand.com>
To: Jarkko Lavinen <jarkko.lavinen@nokia.com>,
	LKML <linux-kernel@vger.kernel.org>
Cc: linux-mtd <linux-mtd@lists.infradead.org>
Subject: Re: [PATCH/RFC] oops and panic message logging to MTD
Date: Wed, 04 Jul 2007 09:54:21 +0100	[thread overview]
Message-ID: <1183539261.4538.14.camel@localhost.localdomain> (raw)
In-Reply-To: <20070703094702.GA11992@angel.research.nokia.com>

On Tue, 2007-07-03 at 12:47 +0300, Jarkko Lavinen wrote:
> On Tue, Jun 19, 2007 at 11:00:54AM +0100, Richard Purdie wrote:
> > Its not a case of formatting the whole partition. The whole point of
> > this code is the following use case:
> > 
> > 1. Device crashes
> > 2. Device reboots
> > 3. mtdoops partition has a log of why it crashed
> 
> The oops logger uses oops_in_progress variable to detect the begin and the 
> end of an oops.  The end is detected when the first non-oops line comes and
> oops_in_progress is false.
> 
> This works if the kernel is still running after the oops and gemerates some 
> non-oops messages.  But if there is no non-oops line following an oops, no
> flushing will occur and there won't be a log on flash.

There was a printk within bust_spinlocks which flushed the klogd queues
and hence flushed the mtd_oops queue too.

I've noticed this has recently been removed and replaced with a wait
queue [1] and hence the problem mentioned above now exists (but didn't
when the driver was developed).

[1] http://git.o-hand.com/?p=linux-rpurdie;a=commitdiff;h=e3e8a75d2acfc61ebf25524666a0a2c6abb0620c

This raises the question of how to known when the oops has completed.
The neatest solution I can see would be to add some kind of optional
sync function pointer to struct console. Would that be acceptable?

Richard

WARNING: multiple messages have this Message-ID (diff)
From: Richard Purdie <rpurdie@openedhand.com>
To: Jarkko Lavinen <jarkko.lavinen@nokia.com>,
	LKML <linux-kernel@vger.kernel.org>
Cc: dedekind@infradead.org, linux-mtd <linux-mtd@lists.infradead.org>
Subject: Re: [PATCH/RFC] oops and panic message logging to MTD
Date: Wed, 04 Jul 2007 09:54:21 +0100	[thread overview]
Message-ID: <1183539261.4538.14.camel@localhost.localdomain> (raw)
In-Reply-To: <20070703094702.GA11992@angel.research.nokia.com>

On Tue, 2007-07-03 at 12:47 +0300, Jarkko Lavinen wrote:
> On Tue, Jun 19, 2007 at 11:00:54AM +0100, Richard Purdie wrote:
> > Its not a case of formatting the whole partition. The whole point of
> > this code is the following use case:
> > 
> > 1. Device crashes
> > 2. Device reboots
> > 3. mtdoops partition has a log of why it crashed
> 
> The oops logger uses oops_in_progress variable to detect the begin and the 
> end of an oops.  The end is detected when the first non-oops line comes and
> oops_in_progress is false.
> 
> This works if the kernel is still running after the oops and gemerates some 
> non-oops messages.  But if there is no non-oops line following an oops, no
> flushing will occur and there won't be a log on flash.

There was a printk within bust_spinlocks which flushed the klogd queues
and hence flushed the mtd_oops queue too.

I've noticed this has recently been removed and replaced with a wait
queue [1] and hence the problem mentioned above now exists (but didn't
when the driver was developed).

[1] http://git.o-hand.com/?p=linux-rpurdie;a=commitdiff;h=e3e8a75d2acfc61ebf25524666a0a2c6abb0620c

This raises the question of how to known when the oops has completed.
The neatest solution I can see would be to add some kind of optional
sync function pointer to struct console. Would that be acceptable?

Richard


  reply	other threads:[~2007-07-04  8:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-18 16:31 [PATCH/RFC] oops and panic message logging to MTD Richard Purdie
2007-06-19  7:55 ` Artem Bityutskiy
2007-06-19 10:00   ` Richard Purdie
2007-06-19 10:29     ` Artem Bityutskiy
2007-06-19 10:52       ` Richard Purdie
2007-06-19 11:05         ` Artem Bityutskiy
2007-07-03  9:47     ` Jarkko Lavinen
2007-07-03  9:47       ` Jarkko Lavinen
2007-07-04  8:54       ` Richard Purdie [this message]
2007-07-04  8:54         ` Richard Purdie
2007-06-19  8:07 ` Artem Bityutskiy
  -- strict thread matches above, loose matches on Subject: below --
2007-05-29 12:31 Richard Purdie
2007-05-29 12:35 ` Richard Purdie

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=1183539261.4538.14.camel@localhost.localdomain \
    --to=rpurdie@openedhand.com \
    --cc=jarkko.lavinen@nokia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.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.