Re: Kexec, DMA, and SMP

From: Corey Minyard (minyard@acm.org)
Date: Sun Feb 16 2003 - 23:26:08 EST


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Eric W. Biederman wrote:

|Corey Minyard <minyard@acm.org> writes:
|
|
|
|>Eric W. Biederman wrote:
|>
|>|Corey Minyard <cminyard@mvista.com> writes:
|>|
|>|>|
|>|>|(So adding a special mode to the power management code may
|>|>|be too much overhead. Besides, sometimes, you can just pull
|>|>|a reset line, and don't have to do anything even remotely
|>|>|related to power management.)
|>|>
|>|>True, I didn't mean the high-level power management code directly.
But the
|>|>PCI API defines a suspend operation that could take a special mode
for this.
|>|
|>|
|>|The generic device api has a shutdown method for this. And in the
non panic
|>|case we use it. Not a lot of devices have it implemented but it exists.
|>|
|>|And except that it doesn't have a restriction that it can't block is
pretty
|>|much what you want.
|>
|>That's a pretty big restriction. Plus, you can't claim spinlocks.
|>
|>The panic shutdown is different from an orderly shutdown. What the
current
|>shutdown does is probably not what you want.
|>
|>
|
|I do not see a large difference between the desired semantics of an
|orderly shutdown, and the desired semantics of a panic shutdown.
|
An orderly shutdown will:

~ * claim locks and block as necessary
~ * free memory associated with the device
~ * flush device queues
~ * Fully shut down the device

An orderly shutdown should make sure the system remains sane after it
finishes and the data on the device is correct.

A panic shutdown should only disable DMA with as little code as possible
without locking, blocking, etc. No effort should be taken to keep the
system sane (beyond clobbering memory), since it's not sane to begin
with :-).

You may want to say that this shutdown will be the panic shutdown and not be
an orderly shutdown. That's fine, although I would suggest a name change.
I couldn't find any documentation on what the shutdown call was supposed
to do.

|
|
|
|Because the kernel to handle the panic only initializes those devices
|it can reliably initialize from any state. And it is living in an
|area of memory the old kernel did not allow DMA to.
|
Are you sure this will be ok? I'm not sure either way. How much memory
does
a kernel take to boot up and operate for this? If it's a few meg, it's
probably livable.
If it's a lot of memory, it's probably not going to be acceptable.

Plus, perhaps you would want to protect the output of the kernel dump
somehow.
That's going to be a lot more memory than you can reserve. And if you
can shut
off DMA, none of this should matter anyway.

The rest of what you said, about the panic kernel only taking the core
dump and
then rebooting, makes sense to me.

- -Corey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+UGRfIXnXXONXERcRArgvAJ96cqVaxZeA83KuR1kSXFKVRSnpIACfQ83W
gc5bibmlh4sPmmq6onPc5w0=
=bgpj
-----END PGP SIGNATURE-----

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Feb 23 2003 - 22:00:16 EST