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

Borislav Petkov
2010-12-21T07:43:08Z

On Mon, Dec 20, 2010 at 09:13:33PM -0800, Tony Luck wrote:
> On Mon, Dec 20, 2010 at 4:48 PM, Huang Ying <ying.huang@intel.com> wrote:
> > If persistent storage driver (such as ERST) implements kmsg_dumper by
> > themselves, that should be easier to use multiple records for one
> > message dumping request.
>
> Or I can build it into the fs/pstore layer. If the record size looks too
> small[*], loop writing multiple records (starting with the tail of the buffer,
> so that if the persistent store fills up, we are sure to have the stack
> back trace and register dump).

Wait a second, isn't this loop writing actually what we want?!

I mean, if the pstore is big enough to contain, say the last ca. 50 or
so oops messages (this size should suffice even for OOMkill oopses),
we do make sure that we always have the last set of oopses belonging
together and thus if we panic, we have also the relevant ones.

[ IIRC, each ERST record can contain roughly 8K, and we want 50 of
those so having a 1M flash on the platform isn't science fiction
anymore, no? ]

By loop writing it, we also make sure we overwrite the oldest oopses
which, if the pstore is big enough, shouldn't have anything to do with
the next set to be written.

So, basically designing the pstore as a big enough circular buffer
should suffice, no?

This would even alleviate the need for the notification heuristics and
writeout to userspace.

Hmm...

--
Regards/Gruss,
Boris.