Re: [OT] module performance

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

 



Hi Khanh,

They differ basically on modprobe's ability to resolve dependencies
(based on a makefile-like file previously created with depmod, tipically
/lib/modules/*/modules.dep on RH systems) and load all modules necessary
to activate a specific one. insmod OTOH will try to load the specified
module *only*, and therefore will fail if dependencies are not resolved.

As you might have guessed, modprobe is a wrapper around insmod: it
parses the depmod-generated file, learns all inter-dependencies among
modules and then call insmod (or rmmod) to actually carry out module
loading (or unloading). You can check this with the -n and -v switches:

# modprobe -nv ipt_state
/sbin/insmod /lib/modules/2.4.20/kernel/net/ipv4/netfilter/ip_conntrack.o
/sbin/insmod /lib/modules/2.4.20/kernel/net/ipv4/netfilter/ipt_state.o

(ip_state depends on ip_conntrack)

Compare it to the same attempt using insmod:

# insmod -n ipt_state
Using /lib/modules/2.4.20/kernel/net/ipv4/netfilter/ipt_state.o

HTH,

Andre

On Sun, 16 Feb 2003 09:23:23 -0500
Khanh Tran <khanh@slc.edu> wrote:

> Here's a follow-up to this train of thought:
> 
> Does someone feel like giving a somewhat detailed explanation of the
> difference between using insmod and modprobe to load kernel modules? 
> This is probably slightly off-topic, but still relevant to loading
> ip_tables modules and the performance of the firewall.
> 
> Thanks again...
> 
> Khanh Tran
> Network Operations
> Sarah Lawrence College

-- 
Andre Oliveira da Costa


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux