Re: [concept & "good taste" review] persistent store

From: Borislav Petkov
Date: Mon Dec 20 2010 - 02:26:46 EST


On Sun, Dec 19, 2010 at 12:17:53PM -0800, Tony Luck wrote:
> > So, I think what we could do is keep our big enough pstore with enough
> > free space for a bunch of oopses in case we panic. In the remaining
> > cases, we write them out thus freeing some more space.
>
> Some feedback from syslogd (or whatever it is that gets things from
> dmesg into /var/log/messages) would help here ... though to be really
> useful it might need "fsync" to /var/log/messages, which might not
> be a welcome addition.

Right.

However, AFAICT, all warnings/oopses go to dmesg anyway and from there
to syslog so actually there should be no need to save them in pstore
too, methinks.

IOW, the simple (maybe too simple) algo of the pstore could be something
like:

1. Got a relevant message from kernel, log it.

2. Am I still alive?
|-> yes => Ah ok, non-critical, it should be in the logs anyway, drop last message set from pstore.
|-> no => Well I can't do here anything anyway, I'm dead... note-to-self: Show last messages set to user upon next boot.

So, the pstore should actually be constantly almost empty rather than
almost full. And it definitely is going to contain the last critical
oops which may or may not be in the syslog.

Or am I missing something?

Thanks.

--
Regards/Gruss,
Boris.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/