All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: "Jeff Garzik" <jgarzik@pobox.com>,
	"Randy Dunlap" <rdunlap@xenotime.net>,
	"Mark Lord" <kernel@teksavvy.com>,
	"Ahmed S. Darwish" <darwish.07@gmail.com>,
	"James Bottomley" <James.Bottomley@suse.de>,
	"Tejun Heo" <tj@kernel.org>, "Ingo Molnar" <mingo@elte.hu>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Ingo Molnar" <mingo@redhat.com>, X86-ML <x86@kernel.org>,
	"Tony Luck" <tony.luck@intel.com>,
	"Dave Jones" <davej@redhat.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Willy Tarreau" <wtarreau@hera.kernel.org>,
	"Willy Tarreau" <w@1wt.eu>,
	"Dirk Hohndel" <hohndel@infradead.org>,
	Dirk.Hohndel@intel.com, IDE-ML <linux-ide@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"Linus Torvalds" <torvalds@linux-foundation.org>,
	"Peter Zijlstra" <a.p.zijlstra@chello.nl>,
	"Frédéric Weisbecker" <fweisbec@gmail.com>,
	"Borislav Petkov" <bp@alien8.de>,
	"Arjan van de Ven" <arjan@infradead.org>
Subject: Re: [PATCH 0/2][concept RFC] x86: BIOS-save kernel log to disk upon panic
Date: Mon, 31 Jan 2011 13:29:31 +1030	[thread overview]
Message-ID: <201101311329.31562.rusty@rustcorp.com.au> (raw)
In-Reply-To: <4D3F559C.1050809@zytor.com>

On Wed, 26 Jan 2011 09:28:36 am H. Peter Anvin wrote:
> On 01/25/2011 02:45 PM, Jeff Garzik wrote:
> > On 01/25/2011 05:16 PM, Randy Dunlap wrote:
> >> On Tue, 25 Jan 2011 17:10:49 -0500 Mark Lord wrote:
> >>
> >>> On 11-01-25 12:05 PM, Ahmed S. Darwish wrote:
> >>>>
> >>>> My current x86 laptop includes the very common ATA PIIX controller.
> >>>
> >>>
> >>> ata_piix is just about ideal for this sort of thing.
> >>>
> >>> Except, don't use the BIOS to write the logs,
> >>> but rather code/use a very simple set of polling-PIO
> >>> functions to talk directly through the PIIX to the drive.
> >>>
> >>> Really really simple code to do that, and it would likely
> >>> work with anything ata-piix, and most other non-AHCI chipsets too.
> >>>
> >>> Not perfect, but probably good enough for a lot of scenarios.
> >>> The old hd.c driver shows how to read/write a sector at a time,
> >>> and that kind of code is easily converted to simply poll for completion.
> >>
> >> I don't know how/where to find it, but Rusty Russell had a version of this
> >> many, many years ago.
> > 
> > You beat me to the reply :)
> > 
> > http://lwn.net/Articles/9905/
> > 
> > but IIRC there were updates and improvements.
> > 
> 
> "Not perfect" is really not good enough.  You're writing to the disk, so
> it *has* to be perfect.  That means dealing with having shared IDE/AHCI
> device and doing the right thing, and the possibility that the kernel
> has interrupts enabled, yadda yadda.

Not for the limited problem of trying to get some logs out.

My driver read the sectors, checked it was full of the magic signature, then
overwrote them.  It's possible for that to screw up, but unlikely.  The boot
script mailed it off to a central site, reset the sector and rearmed the
oopsdumper.

> In the end you end up with something that looks, again, like kexec/kdump.

That was the proposed solution back then, too.  If I'd realized how long
that would take to arrive, I would have kept pushing...

BTW, anyone know whether distros turn it on?    Ubuntu seems to enable it
in the config, but I've never seen it in action.  My laptop has frozen
a couple of times, but maybe it really froze...

Cheers,
Rusty.

  parent reply	other threads:[~2011-01-31  2:59 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-25 13:47 [PATCH 0/2][concept RFC] x86: BIOS-save kernel log to disk upon panic Ahmed S. Darwish
2011-01-25 13:51 ` [PATCH -next 1/2][RFC] x86: Saveoops: Switch to real-mode and call BIOS Ahmed S. Darwish
2011-01-25 17:26   ` H. Peter Anvin
2011-01-25 13:53 ` [PATCH -next 2/2][RFC] x86: Saveoops: Reserve low memory and register code Ahmed S. Darwish
2011-01-25 17:29   ` H. Peter Anvin
2011-01-26  9:04     ` Ahmed S. Darwish
2011-01-25 14:09 ` [PATCH 0/2][concept RFC] x86: BIOS-save kernel log to disk upon panic Ingo Molnar
2011-01-25 15:08   ` Tejun Heo
2011-01-25 17:33     ` H. Peter Anvin
2011-01-26 11:44       ` Ahmed S. Darwish
2011-02-03 14:36     ` Pavel Machek
2011-02-03 15:28       ` H. Peter Anvin
2011-02-03 17:57         ` Ingo Molnar
2011-02-03 21:07           ` H. Peter Anvin
2011-01-25 15:36   ` Ahmed S. Darwish
2011-01-25 16:02     ` James Bottomley
2011-01-25 17:05       ` Ahmed S. Darwish
2011-01-25 17:20         ` James Bottomley
2011-01-25 22:10         ` Mark Lord
2011-01-25 22:16           ` Randy Dunlap
2011-01-25 22:45             ` Jeff Garzik
2011-01-25 22:58               ` H. Peter Anvin
2011-01-26  0:26                 ` Jeff Garzik
2011-01-31  2:59                 ` Rusty Russell [this message]
2011-01-31 10:45                   ` Ingo Molnar
2011-01-25 17:32     ` Tony Luck
2011-01-25 17:36       ` H. Peter Anvin
2011-01-25 19:04       ` Jeff Garzik
2011-01-25 14:49 ` Tejun Heo
2011-01-28  7:59   ` Jan Ceuleers
2011-01-25 20:25 ` Linus Torvalds
     [not found]   ` <AANLkTinU0KYiCd4p=z+=ojbkeEoT2G+CAYvdRU02KJEn-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-01-26 12:49     ` Ahmed S. Darwish
2011-01-26 12:49       ` Ahmed S. Darwish
2011-01-26 12:58       ` Ingo Molnar
2011-01-26 12:58         ` Ingo Molnar
     [not found]         ` <20110126125813.GA26952-X9Un+BFzKDI@public.gmane.org>
2011-01-26 13:34           ` Ahmed S. Darwish
2011-01-26 13:34             ` Ahmed S. Darwish
2011-01-26 14:00             ` Ingo Molnar
2011-01-26 14:00               ` Ingo Molnar
     [not found]               ` <20110126140030.GB30064-X9Un+BFzKDI@public.gmane.org>
2011-01-27  4:35                 ` H. Peter Anvin
2011-01-27  4:35                   ` H. Peter Anvin
     [not found]                   ` <4D40F5FD.6090507-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2011-01-27 11:41                     ` Ingo Molnar
2011-01-27 11:41                       ` Ingo Molnar
     [not found]                       ` <20110127114113.GB20279-X9Un+BFzKDI@public.gmane.org>
2011-01-27 15:47                         ` Eric W. Biederman
2011-01-27 15:47                           ` Eric W. Biederman
     [not found]                           ` <m1aaimxs9h.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>
2011-01-27 16:12                             ` H. Peter Anvin
2011-01-27 16:12                               ` H. Peter Anvin
2011-01-26 23:07       ` Luck, Tony
2011-01-26 23:07         ` Luck, Tony
2011-01-26 23:07         ` [PATCH 0/2][concept RFC] x86: BIOS-save kernel log to disk upon Luck, Tony
2011-01-26 23:07         ` [PATCH 0/2][concept RFC] x86: BIOS-save kernel log to disk upon panic Luck, Tony
     [not found]         ` <987664A83D2D224EAE907B061CE93D53019438EABF-osO9UTpF0URqS6EAlXoojrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-01-26 23:16           ` Dave Jones
2011-01-26 23:16             ` Dave Jones
     [not found]             ` <20110126231620.GA14807-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-01-26 23:21               ` Luck, Tony
2011-01-26 23:21                 ` Luck, Tony
     [not found]                 ` <20110126233033.GB14807@redhat.com>
     [not found]                   ` <987664A83D2D224EAE907B061CE93D53019438EBB6@orsmsx505.amr.corp.intel.com>
     [not found]                     ` <4D40F7F1.3020509@zytor.com>
     [not found]                       ` <20110127120039.GD20279@elte.hu>
2011-01-27 18:35                         ` Luck, Tony
2011-01-27 18:35                           ` [PATCH 0/2][concept RFC] x86: BIOS-save kernel log to disk upon Luck, Tony
2011-01-27 18:35                           ` [PATCH 0/2][concept RFC] x86: BIOS-save kernel log to disk upon panic Luck, Tony
     [not found]                         ` <4D4197CB.9070201@zytor.com>
     [not found]                           ` <20110127162429.GB26437@elte.hu>
2011-01-27 18:56                             ` Luck, Tony
2011-01-27 18:56                               ` [PATCH 0/2][concept RFC] x86: BIOS-save kernel log to disk upon Luck, Tony
2011-01-27 18:56                               ` [PATCH 0/2][concept RFC] x86: BIOS-save kernel log to disk upon panic Luck, Tony
2011-01-27  1:09           ` Ahmed S. Darwish
2011-01-27  1:09             ` Ahmed S. Darwish
     [not found]       ` <20110127021338.GA20334@redhat.com>
     [not found]         ` <20110127021338.GA20334-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-01-27  3:33           ` Ahmed S. Darwish
2011-01-27  3:33             ` Ahmed S. Darwish
2011-01-27  4:44           ` H. Peter Anvin
2011-01-27  4:44             ` H. Peter Anvin
     [not found]             ` <4D40F81E.1030009-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2011-01-27  5:26               ` Ahmed S. Darwish
2011-01-27  5:26                 ` Ahmed S. Darwish
2011-01-27  7:51                 ` Eric W. Biederman
2011-01-27  7:51                   ` Eric W. Biederman
2011-02-02 11:13                   ` Ahmed S. Darwish
2011-02-02 11:13                     ` Ahmed S. Darwish
2011-02-02 11:13                     ` [PATCH 0/2][concept RFC] x86: BIOS-save kernel log to disk Ahmed S. Darwish
2011-02-02 11:13                     ` [PATCH 0/2][concept RFC] x86: BIOS-save kernel log to disk upon panic Ahmed S. Darwish

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=201101311329.31562.rusty@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=Dirk.Hohndel@intel.com \
    --cc=James.Bottomley@suse.de \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@infradead.org \
    --cc=bp@alien8.de \
    --cc=darwish.07@gmail.com \
    --cc=davej@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=hohndel@infradead.org \
    --cc=hpa@zytor.com \
    --cc=jgarzik@pobox.com \
    --cc=kernel@teksavvy.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=rdunlap@xenotime.net \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=torvalds@linux-foundation.org \
    --cc=w@1wt.eu \
    --cc=wtarreau@hera.kernel.org \
    --cc=x86@kernel.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.