Re: How to remove all unused modules?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



colin wrote:
Hi Greg,
Ok, I see the problem.
But why kernel 2.2 offers the way to remove all unused modules by
this:"rmmod -a"?

It's better to unload the unused modules because our embedded system doesn't
have much memory.

Regards,
Colin



----- Original Message ----- From: "Greg KH" <greg@xxxxxxxxx>
To: "colin" <colin@xxxxxxxxxxxxxx>
Cc: <kernelnewbies@xxxxxxxxxxxx>
Sent: Saturday, June 17, 2006 4:21 AM
Subject: Re: How to remove all unused modules?


On Fri, Jun 16, 2006 at 03:54:48PM +0800, colin wrote:
Hi all,
How to remove all unused modules?
I use 2.6 kernel and found that "rmmod -a" doesn't work any more.
Why do you want to do that?  How do you know if a module is being used
or not (hint, the usb drivers and network drivers do not increment their
usage count when in use, unloading them can render a machine pretty
dead...)

good luck,

greg k-h


And its not just network drivers (IIUC)
The module usage count only counts uses/dependencies of other modules,
userspace deps are *not* counted.

ForEx:

$ lsmod |grep '0 $'
radeon                106849  0
battery                 9413  0
ohci1394               35205  0
uhci_hcd               32465  0
ohci_hcd               21981  0

I can assure you that I am currently using the screen driven by the radeon driver.

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux