User: Password:
|
|
Subscribe / Log in / New account

Module unloading in a reference counted world

Module unloading in a reference counted world

Posted Jan 29, 2004 11:08 UTC (Thu) by xanni (subscriber, #361)
Parent article: Module unloading in a reference counted world

As I have already told Linus in person on at least two occasions, there are unfortunately several other important reasons to unload modules, for example:

  • To reinitialise hardware without rebooting (rescanning SCSI busses!)
  • Hot-pluggable hardware (including PCMCIA and USB), especially on laptops that are suspended rather than being rebooted and that sometimes use a vast number of different hot-pluggable devices between reboots
  • Rarely used filesystems on removable media (e.g. accessing an HFS CD-ROM)
Cheers,
       *** Xanni ***


(Log in to post comments)

Why o why?

Posted Jan 29, 2004 12:55 UTC (Thu) by hummassa (subscriber, #307) [Link]

I did not understand your arguments. Modules can be shutdown/reinitialized without unloading. So, let's see:

  • To reinitialise hardware without rebooting... shutdown module, reinitialize module, no need to unload.
  • Hot-pluggable hardware (including PCMCIA and USB), especially on laptops that are suspended rather than being rebooted and that sometimes use a vast number of different hot-pluggable devices between reboots... vast number? let's see... I have two different 802.11b usb adapters + mp3 player + camera + webcam + mouse + keyboard + palmtop + flash disk + smart media reader. All of them take, like, 100KiB of the kernel memory? the hotplug routine is (at boot): verify all hotplugable stuff if they are still there, if not send hotplug-unplug event to the driver, it sits there until you want to plug the thing on again.
  • Rarely used filesystems on removable media (e.g. accessing an HFS CD-ROM)... why not just leave it there?

Ok, before you start hating me, I will give the only real good argumento pro-module-unloading: so you can upgrade a buggy or insecure module without (possibly expensive in terms of time) rebooting the machine.

Why o why?

Posted Jan 29, 2004 19:04 UTC (Thu) by brouhaha (subscriber, #1698) [Link]

The same issues with module unloading also occur with simply shutting down a module, unless you don't mind letting the module leak memory.

Why o why?

Posted Jan 31, 2004 0:23 UTC (Sat) by giraffedata (subscriber, #1954) [Link]

I guess it depends upon what you mean by shutdown.

However, the examples given are just cases where traditional modules do something only at load time, so the only way to do it over is to unload and load again. But there's no reason those modules couldn't do the same thing (tearing down, rebuilding) while loaded and running.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds