Module Dependency Calculator
Calculate kernel module load order and dependency depth from modinfo dependency chains.
About Module Dependency Calculator
Kernel modules can depend on other modules (a filesystem driver depending on a checksum library module, a network driver depending on a bus abstraction module, etc.), recorded in modules.dep (generated by `depmod` and consulted by `modprobe`). modprobe resolves the full dependency graph and loads modules bottom-up — the deepest, most fundamental dependency loads first so that each subsequent module's symbols are already resolvable — meaning dependency chain depth directly determines how many sequential (not parallel) load steps modprobe must perform for that module tree.
Formula
Load order
modprobe loads modules leaf-first: deepest dependency loads before its dependents; target module loads last
Worked example
With the default values below, Module Dependency Calculator returns Dependency Chain Depth of 4. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Direct Dependencies of Target Moduleaccepts 0–1,024
- 3
- Avg Dependencies per Dependency Moduleaccepts 0–64
- 1.5
- Longest Chain Depth Observed (modinfo/lsmod)accepts 1–100
- 4
Results
- Dependency Chain Depth
- 4
- Estimated Total Modules Loaded
- 24
- Direct Dependencies
- 3
- Load Order Note
- modprobe resolves and loads the deepest dependency first — with a chain depth of 4, the module 4 levels down from the target loads first, followed by each intermediate level, with the target module itself loading last.
Step by step
- 1Values used
- 2Load order
- 3Dependency Chain Depth= 4
- 4Estimated Total Modules Loaded= 24
- 5Direct Dependencies= 3
- 6Load Order Note= modprobe resolves and loads the deepest dependency first — with a chain depth of 4, the module 4 levels down from the target loads first, followed by each intermediate level, with the target module itself loading last.
Assumptions and limits
- The result is derived only from the 3 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to whole numbers, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
How do I see a module's full dependency chain on my system?
`modinfo -F depends <module>` lists direct dependencies. For the full resolved chain modprobe would load, check `/lib/modules/$(uname -r)/modules.dep | grep ^<module>.ko` which lists every transitively required .ko file in load order.
What's the difference between modprobe and insmod for handling dependencies?
insmod loads exactly the single module file given and fails immediately if any dependency isn't already loaded — it has no dependency resolution. modprobe wraps insmod with dependency awareness, consulting modules.dep to automatically load every required module first in the correct order.
Why would depmod need to be re-run after installing a new kernel module?
depmod scans all installed .ko files and rebuilds modules.dep (and related index files) to reflect their actual symbol dependencies — installing a module manually (e.g. via `make modules_install`) without re-running depmod leaves modprobe with a stale dependency map that may not know the new module exists or what it needs.
Related Calculators
You might also need
- Kernel Thread CalculatorCommonly used together
- Package Dependency CalculatorCommonly used together
- Boot Time CalculatorCommonly used together
- Kernel Parameter CalculatorAlso in System Administration
- Kernel Log Size CalculatorAlso in System Administration
- Package Size CalculatorAlso in System Administration
