Linux-kernel mailing list archive 1999-23,: Re: RFC: Devices, buses and hotplug

# Re: RFC: Devices, buses and hotplug

Ingo Oeser (ingo.oeser@informatik.tu-chemnitz.de)
Mon, 7 Jun 1999 11:49:03 +0200 (CEST)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Andrzej Krzysztofowicz: "[PATCH] OOPS on swapon"
- Previous message: Andreas Schwab: "[PATCH] Missing recalc_sigpending"
- In reply to: Alan Cox: "Re: RFC: Devices, buses and hotplug"

On Sun, 6 Jun 1999, Alan Cox wrote:

> > (4) The bus-dependent code receives an unplug notification and sends
> > it to the driver. The driver releases the device, bus-dependent
> > code removes it and deallocates all of its resources. Done.
>
> What if the driver says "Im in the middle of something" or "but there
> is an fs mounted".
>
> Just to remind you its -not- trivial 8)

Hmm, as long as we don't have fds[1] that could die gracefully
and applications that could handle this...

... I would call this _impossible_

The thing is, that a fd is valid from sucessful open to
sucessful close. So everything this fd depends on, is open too.

But we could introduce a new signal (bad, since not POSIX), or
use a new semantic for an existing one (even worse) to say "Hey,
this fd is dead now! Any use from now on will cause errors."

Another simplier problem is, if the ressource is _temporarly_
unavailable[2].

Then we could simply block all the process that use our ressource
and its logical and physical descandents, but we still have to
save/restore context of this hardware[3].

BTW: But this would be better discussed at linux-future ;)
So I CC them, and hope we'll move there.

PS: I cut down the recipents.

Regards

Ingo Oeser

[1] file descriptors given to userland in this context
[2] e.g. operator/maintainer exchanges bad card
[3] Once we can do this with _all_ our devices, we could also
easily support checkpointing, software suspending etc.

    --
    Feel the power of the penguin - run linux@your.pc
    <esc>:x

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

- Next message: Andrzej Krzysztofowicz: "[PATCH] OOPS on swapon"
- Previous message: Andreas Schwab: "[PATCH] Missing recalc_sigpending"
- In reply to: Alan Cox: "Re: RFC: Devices, buses and hotplug"