public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marco Stornelli <marco.stornelli@gmail.com>
To: Sergiu Iordache <sergiu@chromium.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	"Ahmed S. Darwish" <darwish.07@gmail.com>,
	Artem Bityutskiy <Artem.Bityutskiy@nokia.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] char drivers: ramoops debugfs entry
Date: Sat, 02 Jul 2011 13:59:49 +0200	[thread overview]
Message-ID: <4E0F0835.4090104@gmail.com> (raw)
In-Reply-To: <CAGDaqBQSeWxhWU53rBnY8t61ueSh9=RkqTLqnAUjA28Lub8HdA@mail.gmail.com>

Il 02/07/2011 11:01, Sergiu Iordache ha scritto:
> On Sat, Jul 2, 2011 at 1:01 AM, Marco Stornelli
> <marco.stornelli@gmail.com>  wrote:
 >>
>> It was easy because the record size had a fixed length (4096), so maybe at
>> this point it can be sufficient the record size information. I see a little
>> problem however. I think we could use debugfs interface to dump the log in
>> an easy way but we should be able to dump it even with /dev/mem. Specially
>> on embedded systems, debugfs can be no mounted or not available at all. So
>> maybe, as you said below, with these new patches we need a memset over all
>> the memory area when the first dump is taken. However, the original idea was
>> to store even old dumps. In addition, there's the problem to catch an oops
>> after a start-up that "clean" the area before we read it. At that point we
>> lost the previous dumps. To solve this we could use a "reset" paramater, but
>> I think all of this is a little overkilling. Maybe we can only bump up the
>> record size if needed. What do you think?
> The problem with a fixed record size of 4K is that it is not very
> flexible as some setups may need more dump data (and 4K doesn't mean
> that much). Setting the record size via a module parameter or platform
> data doesn't seem as a huge problem to me if you are not using debugfs
> as you should be able to somehow export the record size (since you
> were the one who set it through the parameter in the first place) and
> get the dumps from /dev/mem.

The point here is not how to set record size, but what it does mean to 
have a variable record size compared with the current situation. 
However, if we know that there are situation where 4k are not 
sufficient, ok we can modify it.

>
> I've thought more about this problem today and I have thought of the
> following alternative solution: Have a debugfs entry which returns a
> record size chunk at a time by starting with the first entry and then
> checking each of the entries for the header (and the presence of the
> timestamp maybe to be sure). It will then return each entry that is
> valid skipping over the invalid ones and it will return an empty
> result when it reaches the end of the memory zone. It could also have
> an entry to reset to the first entry so you can start over. This way
> you wouldn't lose old entries and you could still get a pretty easy to
> parse result.
>

It seems a good strategy for me.

Marco

  reply	other threads:[~2011-07-02 12:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-01  1:28 [PATCH v2 0/3] char drivers: ramoops improvements Sergiu Iordache
2011-07-01  1:28 ` [PATCH v2 1/3] char drivers: ramoops dump_oops platform data Sergiu Iordache
2011-07-01 18:08   ` Marco Stornelli
2011-07-01  1:28 ` [PATCH v2 2/3] char drivers: ramoops record_size module parameter Sergiu Iordache
2011-07-01 17:57   ` Marco Stornelli
2011-07-01 18:41     ` Sergiu Iordache
2011-07-02  8:04       ` Marco Stornelli
2011-07-06 17:08         ` Sergiu Iordache
2011-07-01  1:28 ` [PATCH v2 3/3] char drivers: ramoops debugfs entry Sergiu Iordache
2011-07-01 18:08   ` Marco Stornelli
2011-07-01 18:38     ` Sergiu Iordache
2011-07-02  8:01       ` Marco Stornelli
2011-07-02  9:01         ` Sergiu Iordache
2011-07-02 11:59           ` Marco Stornelli [this message]
2011-07-06 17:18             ` Sergiu Iordache

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=4E0F0835.4090104@gmail.com \
    --to=marco.stornelli@gmail.com \
    --cc=Artem.Bityutskiy@nokia.com \
    --cc=akpm@linux-foundation.org \
    --cc=darwish.07@gmail.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sergiu@chromium.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