public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: "Adam J. Richter" <adam@yggdrasil.com>
Cc: linux-kernel@vger.kernel.org, eblade@blackmagik.dynup.net,
	mochel@osdl.org, Russell King <rmk@arm.linux.org.uk>
Subject: Re: Patch: linux-2.5.42/kernel/sys.c - warm reboot should not suspend devices
Date: 20 Oct 2002 03:17:44 -0600	[thread overview]
Message-ID: <m1of9pwjt3.fsf@frodo.biederman.org> (raw)
In-Reply-To: <200210200701.AAA02683@adam.yggdrasil.com>

"Adam J. Richter" <adam@yggdrasil.com> writes:

> Eric W. Biederman wrote:
> >Hopefully I am not coming off harsh but I am a little cranky this
> >morning,  As before this change I thought things on the device side
> >were pretty much under control they just needed a little stabilization
> >and testing.  And now someone possibly me has to go through every
> >driver and write a shutdown method because someone figured calling
> >free was expensive.
> 
> 	I think I've essentially refuted this in parts of previous
> messages on this thread that Eric has basically ignored in his
> responses.

About free, and the interface I don't much care.  Except that I care
that it is clean, and that device_shutdown does not get neutered.  My
current complaint is now that the interface in 2.5.44 changed it is
ill specified, and setup in a way so that the code will rarely get
tested, and when it is tested it will be tested in a way that is
likely to not expose problems.

But judging from my experience with etherboot, and by the bug reports
I have coming in there is a lot of work where I need to get drivers to
shut themselves down.

There are two cases on reboot.
A) eventually the BIOS toggles the machine Reset line,
   common but not guaranteed to happen.
B) Whatever we call on reboot does not toggle the reset line.

> 	Interested readers should check the previous lkml messages
> with this subject line.  Of particular relevance to this issue, see my
> list of three advantages of the 2.4.x approach of not calling
> unnecessary device-specific shutdown sequences in my message at

Breaking it up is fine, but a real pain.

> http://marc.theaimsgroup.com/?l=linux-kernel&m=103481960911183&w=2,
> where I pasted in a response on the same issue that I originally
> wroted in this thread to Eric Blade (after the paragraph that begins
> "Changing the interface will reduce coplexity as only the code that
> needs to be executed will be called."). 

Not calling the same code in rmmod is wrong because then the is hard
to test.  Without that the code only gets tested when someone is
likely to toggle the reset line on the device anyway, trivially hiding
bugs.  running rmmod and insmod a bunch of times makes a good test for
this kind of thing, and is likely to happen during driver development.

With respect to the embedded case, embedded machines are more likely
to see this problem than desktop machines, on an ordinary reboot.  But
for code bloat I don't have a problem if there is a compile option
that totally removes device_shutdown, to save space.  So long as it
works when it is enabled.

And I do agree that running the bare minimum can increase reliability
in some cases as Eric Blade pointed.  But I don't want an interface
that is optimized for buggy drivers.  We have the source so we can fix
them.

>  Also of interest is Richard
> B. Johnson's example of BIOS reset code that shuts off the PCI bus
> before touching any RAM at
> http://marc.theaimsgroup.com/?l=linux-kernel&m=103462697923792&w=2.

Yes the BIOS work around because some OS's don't shut down their
devices.

> 	I'm willing to get into this in detail again upon request.
> Otherwise, I think it would be a better use of everyone's time not to
> subject linux-kernel readers to an infinite loop.

Mostly I want a comment from Patrick Mochel why he made the change,
and roughly what he was thinking.  So I have a good idea about which
code I need to dig into and send patches to fix.  If he makes a good
case for an independent shutdown, method I am fine with that, just
every driver in the kernel needs to change, and that is a heck of a
lot of work before 2.6.  Otherwise we can go back to calling remove.

Eric

  reply	other threads:[~2002-10-20  9:13 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-20  7:01 Patch: linux-2.5.42/kernel/sys.c - warm reboot should not suspend devices Adam J. Richter
2002-10-20  9:17 ` Eric W. Biederman [this message]
2002-10-20 20:43   ` Patrick Mochel
2002-10-20 23:57     ` Eric W. Biederman
2002-10-21 17:13       ` Patrick Mochel
  -- strict thread matches above, loose matches on Subject: below --
2002-10-21 22:26 Adam J. Richter
2002-10-21 20:56 Adam J. Richter
2002-10-22  4:28 ` Eric W. Biederman
2002-10-17  1:50 Adam J. Richter
2002-10-17  9:08 ` Eric W. Biederman
2002-10-15 19:52 Adam J. Richter
2002-10-16 12:13 ` Eric W. Biederman
2002-10-15 18:54 Adam J. Richter
2002-10-15  2:53 Adam J. Richter
2002-10-15 16:59 ` Eric W. Biederman
2002-10-14 18:41 Adam J. Richter
2002-10-14 20:05 ` Eric W. Biederman
2002-10-15  4:55   ` Eric Blade
2002-10-16  8:01 ` Pavel Machek
2002-10-14 15:25 Adam J. Richter
2002-10-14 16:44 ` Eric W. Biederman
2002-10-14 17:48   ` Richard B. Johnson
2002-10-14 19:28     ` Eric W. Biederman
2002-10-14 20:17       ` Richard B. Johnson
2002-10-13 23:59 Adam J. Richter
2002-10-14  0:07 ` Eric W. Biederman
2002-10-14  5:38   ` Eric Blade
2002-10-14 15:28     ` Eric W. Biederman
2002-10-15  4:34       ` Eric Blade
2002-10-13 23:10 Adam J. Richter
2002-10-13 23:15 ` Russell King
2002-10-14  0:03   ` Eric W. Biederman
2002-10-13 23:54 ` Eric W. Biederman
2002-10-13 22:14 Adam J. Richter
2002-10-13 22:31 ` Russell King
2002-10-13 23:49 ` Eric W. Biederman
2002-10-15 16:35 ` Patrick Mochel
2002-10-15 20:04   ` Mikael Pettersson
2002-10-19 18:30   ` Eric W. Biederman
2002-10-20  9:47     ` Eric W. Biederman
2002-10-13 19:24 Adam J. Richter
2002-10-13 19:51 ` Eric Blade
2002-10-13 21:27   ` Eric W. Biederman
2002-10-13 22:52 ` Andries Brouwer
2002-10-14  0:30   ` 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=m1of9pwjt3.fsf@frodo.biederman.org \
    --to=ebiederm@xmission.com \
    --cc=adam@yggdrasil.com \
    --cc=eblade@blackmagik.dynup.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mochel@osdl.org \
    --cc=rmk@arm.linux.org.uk \
    /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