Re: Module Ideas: Persistence, PnP, and more...

Matthias Urlichs (smurf@noris.de)
8 Sep 1998 14:29:31 +0200


David Howells <David.Howells@nexor.co.uk> writes:
> >
> > Why not just let a userspace configuration manager decide on appropriate
> > settings *before* it loads the module, and pass them at insmod time?
>
> What if it isn't a module?
>
Why would you want any driver which needs to be runtime-configurable not to
be a module?

Since the driver needs config information, said information needs to come
from _somewhere_, i.e. a file system, therefore you can just load the
driver from the file system.

I'm currently doing that with every driver under the sun, except for the
ELF loader and romfs. And I doubt I'm the only one.

> > If a conflict is detected, and it requires changing some other driver's
> > settings, it will probably require shutting down the other driver and
> > reloading it in any case. If an irreconcilable conflict is detected...
> > Well, it's irreconcilable!
>
> What if the other driver is one you can't do without? An 'irreconcilable'
> conflict is, as you say, irreconcilable, and not a lot can be done about it,
> by my software, or anyone else's (though maybe the BIOS can).
>
The call to reconfigure drivers needs to be atomic, i.e. "here's a list of
drivers and the new configuration information for all of them". If even one
of them says "no, I cannot use this", presumably you have kept the old
data in the kernel and can restore everything.

This is not just idle theory, because you might need to reconfigure your
low-level SCSI driver (for example, when somebody hotswaps a PCI card).
This needs to be atomic or you're in BIG trouble.

-- 
Matthias Urlichs      |        noris network GmbH      |       smurf@noris.de
The quote was selected randomly. Really.    |      http://www.noris.de/~smurf/
-- 
Pessimists have already begun to worry about what is going to replace
automation.
                                          -- John Tudor

- 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/faq.html