Re: [RFC] New sysfs tree for hotplug

From: Keiichiro Tokunaga
Date: Tue May 04 2004 - 12:53:50 EST


On Mon, 26 Apr 2004 16:55:55 -0700, Greg KH wrote:
> On Mon, Apr 26, 2004 at 02:58:08PM +0900, Keiichiro Tokunaga wrote:
> >
> > I think it depends on a hotplug driver that is invoked when writing to
> > a "eject" file. In the board case, a board hotplug driver (I'm making)
> > handles those CPUs, memory, and PCI slots on the board. So my
> > story for board hotplug is:
> >
> > - user checks/knows what resources are on the board (dependency)
> > - user writes to the "eject" file of the board properly (invocation)
>
> Why not make a program that does all of this from userspace? It would
> turn off the proper CPUs, memory, and pci slots for a specific "board".
> Otherwise you are going to have to either:
> - hook the current CPU, memory, and pci hotplug code to allow it
> to be called from within the kernel
> - have your kernel code write to a the sysfs files from within
> kernelspace.
>
> Neither of which are acceptable things :(

Actually I'm expecting to use the first option (hook) in the
current code of the board hotplug :)
The board hotplug is supposed to support "board attachment and
detachment". That requires hardware manipulation. So, the
hotplug code (at least, a part of the code) needs to live in
the kernel space. Anyway, I would finish the first rough patches
in a few days and post them. Please take a look at them to see
what I'm trying to do.

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