mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maxim Levitsky <maximlevitsky@gmail.com>
To: Marco Stornelli <marco.stornelli@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: RAMOOPS: few questions
Date: Wed, 02 Jun 2010 13:07:32 +0300	[thread overview]
Message-ID: <1275473252.11579.17.camel@maxim-laptop> (raw)
In-Reply-To: <4C0622BF.8070602@gmail.com>

On Wed, 2010-06-02 at 11:22 +0200, Marco Stornelli wrote: 
> Il 01/06/2010 21:32, Maxim Levitsky ha scritto:
> > Hi,
> > 
> > I want to switch over my own patch that does more or less the same that
> > this driver.
> > 
> > As I see this driver uses ioremap to reserve the memory.
> > However, I have a question about how to tell kernel that specific memory
> > region is reserved.
> > 
> > Well, I use now mem=... to do so, but this wastes space, because the
> > region I need can't be near end of the RAM.
> > 
> 
> Have you got any particular constraints?
The trick I use, and works on most systems is that bios doesn't bother
to clear RAM on reboot. It still uses it for its own purposes.


> 
> > I tried to use 'memmap=20M$0x70000000' on kernel command line, but that
> > just makes kernel reboot.
> > I think its a bug though.
> > 
> > Also, does this driver dupms all kernel log or only panic/oops message?
> 
> It dumps all, but there's a fixed size for each dump, so you can see the
> panic/oops information and the latest prints of the kernel before
> panic/oops.
Thats fine.

> 
> > My patch actually makes kernel store actual printk buffer in fixed
> > location, thus it is very robust. It was rejected though in favour of
> > solution you eventually implemented.
> > 
> > Also I would like to extend your driver to dump old contents of the ram
> > buffer to kernel log, so one wouldn't worry about erasing in on next
> > boot after crash.
> > Don't know when I do that though.
> > 
> 
> ramoops uses a circular buffer of fixed size to store more information.
> The number of "dumps" depends on the region size of memory you use.

You mean it is smart enough not to overwrite the reserved region on next
boot after the crash provided that I managed to tell kernel not to use
it?

This definitely looks promising. I was thinking do to the same thing
when I get free time.

There are still issues though comparing to mine implementation.

Namely, my approach allows to look at kernel log of last kernel even if
there was no panic/oops, and this comes handy when system has reset
button, and your graphical card decides to hang....
However the dump mechanism isn't suitable for that task, but rather a
console.

And second problem is that your driver kicks in quite late stage, while
I managed to start the logging quite early.
Maybe its possible to switch from module_init to some early initcall.
Note that then I had to use ioremap_early.

And last thing that that I suffer from too, is inability to reserve a
region from kernel command line.

memmap=20M$0x70000000 doesn't work.


Thanks for your driver.


Best regards,
Maxim Levitsky


      reply	other threads:[~2010-06-02 10:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-01 19:32 Maxim Levitsky
2010-06-02  9:22 ` Marco Stornelli
2010-06-02 10:07   ` Maxim Levitsky [this message]

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=1275473252.11579.17.camel@maxim-laptop \
    --to=maximlevitsky@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marco.stornelli@gmail.com \
    /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

all inboxes | Powered by JetHome®