public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: "Martin J. Bligh" <Martin.Bligh@us.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Faster reboots (and a better way of taking crashdumps?)
Date: 06 Apr 2002 19:50:07 -0700	[thread overview]
Message-ID: <m18z80nrxc.fsf@frodo.biederman.org> (raw)
In-Reply-To: <1759496962.1018114339@[10.10.2.3]>

"Martin J. Bligh" <Martin.Bligh@us.ibm.com> writes:

> >> 2. Things that are reset by reboot that we don't reset during
> >> normal kernel boot?
> > 
> > A sane BIOS will toggle the board level reset line on reboot.
> > The all don't but that makes it look like a fresh boot, with
> > a negligible speed penalty.
> 
> I know that, but what I mean is that I'm *not* going to get
> this reset if I just jump back to the init point ... I was
> trying to work out what kind of trouble that would cause.

I didn't mean to obfuscate the issue.  There is some trouble you can
get into, but most of it is when asking the BIOS to do things for
you.  Beyond that there a few rare devices that the kernel doesn't
reset right.  Turning off bus master is the primary issue.  There
is work in the linux power management infrastructure that will handle
most of this long term.


> > Seriously check out my code it should just work unless there are 
> 
> OK, I took a very brief scan of just the descriptions of your
> patches - looks like the main thing you're doing is creating
> a 32 bit kernel entry point, right? So above and beyond that
> I'd have to rework the LILO code to work in 32 bit, which 
> probably isn't that hard now I think about it ... all the hard
> stuff is actually done by the command line binary, so maybe ...

Sorry wrong set of patches.  I'm not pushing my kexec stuff quite as
hard.  It is a little lower on my priority list.  Basically the work
is to allow Linux to boot Linux directly.

ftp://download.lnxi.com/pub/src/linux-kernel-patches/linux-2.5.7.kexec.diff
ftp://download.lnxi.com/pub/src/linux-kernel-patches/kexec-2.5.7.kexec.log
ftp://download.lnxi.com/pub/src/mkelfImage/elfboottools-2.0.tar.gz
      type make and see objdir/build/sbin/kexec (work with bzImages)

The basic kernel interface that is added is:

struct segment {
        void *buffer;
        void *dest_addr;
        size_t len;
};
int kexec(void *start, int nr_segments, struct segment *segments);

This appears to be an interface I can support on every linux platform.
it works on x86, and I have a proof of concept alpha port.

The initial transfer of control happens on the bootstrap processor, in
32bit protected mode with paging disabled.  All of the segment
registers are set to a flat 32bit segment with a base address of zero.
And %esp points to an area that is good for a small stack.

The rest is left up the controlling program.  The major discussion
with this happened a while ago.  There was a basic agreement on what
the system call interface should look like, but it really hasn't
progressed much since then.  There are not a lot of booting experts I
can bang heads with :)

> > special apic shutdown rules for NUMAQ machines.
> 
> The APICs should be OK ... the interconnect firmware sets them
> up, and Linux never changes them, so everything *should* be OK
> in theory. Of course if it ever gets screwed up, reboot won't
> fix it, but then I can't reboot at all right now, so ... ;-)

I have code in there to fix things of for the SMP case, you might want
to double check that doesn't mess up the NUMAQ case.
 
> On the other hand, I don't reset the processors fully (I have
> to use NMI to boot rather than the INIT, INIT, STARTUP sequence),
> which seems to be asking for trouble ;-(

Well even the INIT assert, INIT deassert, STARTUP sequence doesn't
reset the processors fully.  Things like the MTRR's remain setup so
I wouldn't worry about it to much.  Assuming the NMI can reliably
get the processor to a kernel entry point.

Eric

  reply	other threads:[~2002-04-07  2:56 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-07  1:32 Faster reboots (and a better way of taking crashdumps?) Martin J. Bligh
2002-04-07  2:50 ` Eric W. Biederman [this message]
2002-04-07  4:00   ` Martin J. Bligh
2002-04-07  4:12     ` Eric W. Biederman
2002-04-08 14:31   ` Suparna Bhattacharya
2002-04-08 17:09     ` Eric W. Biederman
2002-04-09 15:26       ` Suparna Bhattacharya
2002-04-10 15:40         ` Eric W. Biederman
2002-04-10 17:58           ` Andy Pfiffer
2002-04-11 14:15             ` Suparna Bhattacharya
2002-04-11 15:08             ` Eric W. Biederman
2002-04-16 10:02               ` Pavel Machek
2002-04-16 22:59                 ` Alan Cox
2002-04-11 13:56           ` Suparna Bhattacharya
2002-04-11 15:35             ` Eric W. Biederman
2002-04-12 14:49               ` Suparna Bhattacharya
2002-04-12 17:59                 ` Eric W. Biederman
2002-04-15 10:07                   ` Suparna Bhattacharya
  -- strict thread matches above, loose matches on Subject: below --
2002-04-05 19:13 Martin J. Bligh
2002-04-05 20:47 ` Jeremy Jackson
2002-04-06  1:48   ` Martin J. Bligh
2002-04-06  2:55     ` Jeremy Jackson
2002-04-08  7:20       ` Suparna Bhattacharya
2002-04-11  3:47         ` Jeremy Jackson
2002-04-11 14:28           ` Suparna Bhattacharya
2002-04-06 17:56 ` Alan Cox
2002-04-07  1:35   ` Martin J. Bligh
2002-04-06 23:27 ` Eric W. Biederman

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=m18z80nrxc.fsf@frodo.biederman.org \
    --to=ebiederm@xmission.com \
    --cc=Martin.Bligh@us.ibm.com \
    --cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox