From: jhelberg@nl.oracle.com (Joost Helberg)
Newsgroups: comp.os.linux
Subject: loadable device drivers
Date: 13 Aug 92 07:05:43 GMT
Organization: Oracle Europe
X-Newsreader: Tin 1.1 PL3

X-Disclaimer: This message was written by an unauthenticated user
              at Oracle Corporation.  The opinions expressed are those
              of the user and not necessarily those of Oracle.

If you're interested in the pros of loadable drivers only, go to the
end of this article.
In article <1992Aug12.173012.17552@colorado.edu> you write:
: In article <1992Aug11.203828.11554@crd.ge.com> davidsen@crd.ge.com (bill davidsen) writes:
: >
: >  Just one last thought. Linux has really taken to doing the hard stuff
: >first, like virtual memory. Work is going on right now to look at
: >improving the shared libraries, when most other systems don't even
: >/have/ shared libraries.
: >
: 
: Most AT&T variants do.  No BSD flavor I know of has shared libraries.

Next? I thought they had shared libs?

: 
: >  It would be really great to have loadable device drivers. More to the
: >point, it would allow people to add devices without generating a new
: >kernel, something I believe most users would like to see. Nice a it is
: >to have source, I lose an evening of use of my system every time I
: >recompile the kernel.
: >
: 
: Loadable device drivers are bad because you need to relocate them 
: at load time.  Loadable device drivers may be impractical - for 

Relocation isn't bad, what's your point?

: instance, if your disk driver is on the root disk which you can't
: read, you are SOL.  I don't like loadable device drivers - you

Of course, there are a number of drivers which will always reside
in core (sticky), but the rest ....

: don't really gain anything significant that you don't get with a 
: good config utility.
: 
: It takes me ~45 seconds to add a new SCSI driver into my development 

Far too long, and you have to reboot too! i.e. all users have to 
get coffee or tea!

: kernel.  I have automatically generated make files and something 
: like the BSD ioconf.c, table.c.  When I change the configuration 
: file, table.c gets recompiled, and nothing but the new files that
: were'nt built before.
: 
[STUFF DELETED]

: Assuming you run in kernel space :
: 
: 1.  You will have to allocate more kernel memory.  This is a sloppy operation,

You're right, not easy to do.

: 	because currently everything assumes that kernel memory is 
: 	identity mapped.  You may have to swap things arround for 

The kernel must be mapped when implementing loadable device drivers (to
get page-faults) so the kernel doesn't need contiguous memory --> less
problems allocating memory.

: 	other processes just to get a large enough chunk of contigous
: 	physical memory in the right place.  Messy.
: 
: 2.  You need to relocate the drivers at run time if you run them in kernel
: 	space, writing something like LD to load them.

Again, what is the problem here?

: Assuming you run in user space :

The driver shouldn't run in user space.

:
[stuff deleted]
: 
: Get a decent config program, it will accomplish the same thing 
: (except you have to reboot to use the new device driver),
: without all of the negative side effects.

Positive effects:
Much of the positive effects are the same as the effects for paging of user-programs.

- The kernel will never use more core than necessary. Only text/data really
  used will be in core (that is using LRU algorithms). 
- Updating a driver can be done at runtime shortening the development time
  of driver enhancements.

--
   Joost Helberg                                Rijnzathe 6
   jhelberg@oracle.nl                           NL-3454 PV De Meern
   jhelberg@nl.oracle.com                       The Netherlands

   Oracle Europe BV                             Product Line Development	
   Phone: +31 3406 94211                        Fax:   +31 3406 65609
Newsgroups: comp.os.linux