Open-Source Wikis

/

Linux

/

By the numbers

torvalds/linux

By the numbers

Data collected on 2026-04-30 from the master branch at commit 57b8e2d666a3 (Linux 7.1-rc1).

Size

The repository is one of the largest open-source codebases in existence. Counting only .c, .h, .rs, and .S files (the bulk of the kernel proper):

Language File count
C source (.c) ~36,700
C headers (.h) ~26,700
Rust source (.rs) ~350
Assembly (.S) ~1,360
xychart-beta horizontal
  title "Source files by language"
  x-axis [Rust, Assembly, "C headers", "C source"]
  y-axis "File count" 0 --> 40000
  bar [350, 1360, 26700, 36700]

Disk usage of the major top-level directories (du -sh):

Directory Size
drivers/ 1.2 GB
arch/ 167 MB
tools/ 100 MB
include/ 62 MB
sound/ 56 MB
fs/ 51 MB
net/ 38 MB
kernel/ 17 MB
lib/ 12 MB
mm/ 6.3 MB
rust/ 4.8 MB
scripts/ 4.7 MB
security/ 4.2 MB
crypto/ 3.8 MB
block/ 2.2 MB
samples/ 1.9 MB
io_uring/ 896 KB
virt/ 344 KB
ipc/ 292 KB
xychart-beta horizontal
  title "Top-level directory size (MB)"
  x-axis ["ipc","virt","io_uring","block","samples","crypto","security","scripts","rust","mm","lib","kernel","net","fs","sound","include","tools","arch","drivers"]
  y-axis "Size (MB)" 0 --> 1300
  bar [0.3,0.3,0.9,2.2,1.9,3.8,4.2,4.7,4.8,6.3,12,17,38,51,56,62,100,167,1200]

drivers/ alone is ~5x the size of the next-largest directory. This concentration drives a lot of the kernel's policy: MAINTAINERS is huge, the merge window is structured around per-subsystem maintainers, and most defconfigs are dominated by driver options.

Activity

Metric Value
Total commits in repo ~1,444,000
Commits in the last 12 months ~85,400
Unique committer authors (lifetime) ~32,400
First commit (in current history) April 16, 2005 (the git import)
Most recent commit April 29, 2026

(The kernel itself dates to September 1991; the first ~14 years are pre-git, captured in Documentation/process/2.Process.rst and the BitKeeper-era archives. April 16, 2005 is when the kernel migrated to git.)

Recent monthly commit counts (sampled over the last 12 months, sorted oldest → newest):

Month Commits
2025-05 8,159
2025-06 6,322
2025-07 8,033
2025-08 5,391
2025-09 9,434
2025-10 5,955
2025-11 8,915
2025-12 4,279
2026-01 8,793
2026-02 5,115
2026-03 9,521
2026-04 5,265 (partial)

The clear bimodal pattern (large month, small month, repeat) tracks the 9-week release cadence: large months land merge-window patches; small months are -rc stabilization.

Bot-attributed commits

The kernel does not use bots in the way many GitHub projects do. There are no factory-droid[bot], dependabot[bot], or github-actions[bot] accounts in the history. Patches arrive by email through lore.kernel.org and are committed by maintainers under their own identities. AI-assisted contributions, when they happen, are also indistinguishable in git history because the kernel project requires the patch author to sign off personally (Developer Certificate of Origin) and the policy in Documentation/process/coding-assistants.rst requires that the human stand behind the change.

This means the bot-attributed share of commits is effectively 0% by construction. It is not a measure of how much AI assistance is used.

Complexity

A few largest source files (likely refactor candidates) by line count, sampled across the tree:

File Approximate lines
MAINTAINERS ~30,000
Documentation/admin-guide/kernel-parameters.txt ~7,500
kernel/bpf/verifier.c ~25,000
kernel/sched/fair.c ~13,000
mm/memcontrol.c ~7,500
net/core/dev.c ~12,000

(Run wc -l <file> for an exact count on the current revision; these numbers fluctuate per release.)

The BPF verifier and the fair scheduler are the textbook examples of files that have grown extremely complex over time but still ship in a single C file. The verifier in particular tracks every register's possible value at every instruction across all paths.

Architectures

22 architectures live under arch/: alpha, arc, arm, arm64, csky, hexagon, loongarch, m68k, microblaze, mips, nios2, openrisc, parisc, powerpc, riscv, s390, sh, sparc, um (User-Mode Linux), x86, xtensa.

Of these, the four most actively touched in recent history are x86, arm64, riscv, and powerpc. s390 follows closely. The rest receive maintenance patches but no significant new development.

Filesystems

fs/ contains ~50 distinct file system implementations. The major ones (by both deployment and code volume): ext4, xfs, btrfs, f2fs, bcachefs, ntfs3, fuse, nfs, cifs/smb, 9p, ocfs2, plus pseudo-filesystems proc, sysfs, tmpfs, cgroup, bpf, tracefs, debugfs, pstore, efivarfs.

Drivers

drivers/ contains ~140 top-level subdirectories, each of which is itself often very large. The biggest by file count are typically gpu/, net/, media/, usb/, ata/, nvme/, scsi/, staging/, and infiniband/.

Test surface

  • tools/testing/selftests/ ships in-tree user-space tests for ~80 subsystems
  • tools/testing/kunit/ provides the in-kernel unit-test framework KUnit
  • tools/perf/, tools/bpf/, and tools/lib/ ship userspace tooling that exercises kernel features

For more on testing, see How to contribute → Testing.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

By the numbers – Linux wiki | Factory