eeh patch

Greg KH greg at kroah.com
Wed Mar 17 09:33:37 EST 2004


On Tue, Mar 16, 2004 at 04:19:16PM -0600, Nathan Fontenot wrote:
> On Tue, 2004-03-16 at 15:39, Greg KH wrote:
> > Ok, sorry if anyone got offended by this comment, I didn't mean to be so
> > snippy.  I apologize for this.
>
> No offense taken.  EEH always seems to be a hot topic.

Well, other people at your employeer seemed to have taken offense to my
response.  I view it as a learning curve of the open source development
process for people to get used to :)

> >
> > But my main point stands.  If you are going to try to invent a new way
> > to talk to the kernel from userspace, please take about 10 deep breaths
> > and back away from the keyboard.  Then go see how the kernel does things
> > today and please please please use that interface instead.
> >
> This wasn't an attempt to create a new way to talk to the kernel.  I was
> simply following another model I had found that is currently in the
> ppc64 kernel.  AFAIK, procfs, sysfs and syscalls are the only ways to
> communicate with the kernel.  How would you suggest we notify a
> user-space application that an EEH event has occured?

Um, the hotplug event mechanism?  Like the way the rest of the kernel
does such a thing?

> The goal of the code is to reduce the number of panics resulting from
> EEH events.  To do this we wanted to hot-unplug network devices when
> they received an EEH event.  I figure doing this for network devices
> is safe, other devices this would be a big no-no for.
>
> If there is a way to unplug a device from within the kernel please let
> me know?

There's loads of ways to do this.  It all depends on the type of the
device.  See the USB, IEEE1394, PCI, PCMCIA, and other bus interfaces
that all handle this kind of action all the time.

But wait, if you tell the kernel to disconnect such a device, you will
generate a hotplug event automatically.  Haven't you seen that in your
testing?

> I tried to do this using some of the routines I found in the kernel, but
> not with any good results.

What routines did you use?

> I brought this up here because this deals with EEH, something that is
> definitely ppc64 specific.  No reason to inflict EEH on all the other
> arches :)

True, but no reason to invent a new mechanism which has explicitly been
forbidden to add to the kernel either (see the archives of lkml where
this has been discussed many times...)

This is what the hotplug interface is for, please use it to provide a
consistant interface for all types of kernel events.

thanks,

greg k-h

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list