Where can I get an information about the order in which the modules are unloaded when the system shuts down.I am writing a module which is going to be sort of networking protocol so the unloading order is crucial for me. Thanks.
On Wed, Feb 20, 2008 at 04:20:33PM +0200, Eugene Goubine wrote:> Where can I get an information about the order in which the modules are > unloaded > when the system shuts down.I am writing a module which is going to be sort > of networking protocol > so the unloading order is crucial for me.In general, kernel modules are not unloaded at system shutdown. If they are unloaded, that''s done so by the initscripts of various programs. A quick grep ''modprobe -r'' /etc/init.d/* shows that cpuspeed, ip6tables, ip6tables, and lm_sensors initscripts (on my system) unload kernel modules. Thanks, Matt -- Matt Domsch Linux Technology Strategist, Dell Office of the CTO linux.dell.com & www.dell.com/linux
Eugene Goubine wrote:> Where can I get an information about the order in which the modules are > unloaded > when the system shuts down.I am writing a module which is going to be > sort of networking protocol > so the unloading order is crucial for me. > Thanks.AFAIK modules aren''t unloaded at all on shutdown. If your module has dependencies on other modules, that''s up to you to take care of properly in your code. And, since this isn''t really related to the fedora kernel in particular, I''m afraid this probably isn''t really on-topic for this list... -Eric
Thanks a lot ,guys,it helps to understand, and sorry for list-irrelevant questions. On Wed, Feb 20, 2008 at 4:27 PM, Eric Sandeen <sandeen@redhat.com> wrote:> Eugene Goubine wrote: > > Where can I get an information about the order in which the modules are > > unloaded > > when the system shuts down.I am writing a module which is going to be > > sort of networking protocol > > so the unloading order is crucial for me. > > Thanks. > > AFAIK modules aren''t unloaded at all on shutdown. > > If your module has dependencies on other modules, that''s up to you to > take care of properly in your code. > > And, since this isn''t really related to the fedora kernel in particular, > I''m afraid this probably isn''t really on-topic for this list... > > -Eric >
On Wednesday 20 February 2008 09:25:46 am Matt Domsch wrote:> On Wed, Feb 20, 2008 at 04:20:33PM +0200, Eugene Goubine wrote: > > Where can I get an information about the order in which the modules > > are unloaded > > when the system shuts down.I am writing a module which is going to be > > sort of networking protocol > > so the unloading order is crucial for me. > > In general, kernel modules are not unloaded at system shutdown. > > If they are unloaded, that''s done so by the initscripts of various > programs. A quick grep ''modprobe -r'' /etc/init.d/* shows that > cpuspeed, ip6tables, ip6tables, and lm_sensors initscripts (on my > system) unload kernel modules.Nb: in the cpuspeed case, the module unloads aren''t on shutdown either. They''re done when we try loading a cpufreq driver that we think will work on the system, but it doesn''t find supported hardware. Rather than leaving a useless module loaded, we do some clean-up in this case. -- Jarod Wilson jwilson@redhat.com