Skip to content
Calcrivo

Kernel Module Dependency Calculator

Estimate modprobe load order and dependency chain depth for a kernel module tree.

Inputs

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

  1. Values used

    Direct Dependencies of Target Module = 3; Avg Dependencies per Dependency Module = 1.50; Longest Chain Depth Observed (modinfo/lsmod) = 4

  2. Load order

    modprobe loads modules leaf-first: deepest dependency loads before its dependents; target module loads last

  3. Dependency Chain Depth

    = 4

  4. Estimated Total Modules Loaded

    = 24

  5. Direct Dependencies

    = 3

  6. 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.

How it works

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

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.

You might also need