Back in 2014 (time flies), I posted
Subject: MAINTAINERS leaves too many files uncovered
Message-ID: <87mw8rumhb.fsf@blackfin.pond.sub.org>
https://lore.kernel.org/qemu-devel/87mw8rumhb.fsf@blackfin.pond.sub.org/
I updated my findings in 2015, 2016 (at commit e00da552a0d), and 2018
(at v3.1.0-rc2). This is another update, at commit 36e9aab3c56.
Unsurprisingly, the number of files in the tree
$ git-ls-files | wc -l
grows over time:
year 2014 2015 2016 2018 2023
# 3746 4387 4921 6461 9788
Looks exponential to me, doubling every seven years or so.
The number of .c files has grown more slowly:
year 2014 2015 2016 2018 2023
# 1836 1945 2132 2633 3588
The number of .c files not covered by MAINTAINERS
$ for i in `git-ls-files`; do [ "`scripts/get_maintainer.pl -f --no-git-fallback
$i | grep -v '^qemu-devel@nongnu\.org'`" ] || echo $i; done >unmaintained-files
$ grep -c '\.c$' unmaintained-files
went down a lot after my first post, but has since flatlined:
year 2014 2015 2016 2018 2023
# 1066 461 402 259 246
It looks like we've pretty much stopped adding more unmaintained .c
files, i.e. cherry-picking the kernel's 13f1937ef33 (checkpatch: emit a
warning on file add/move/delete) as commit 4be6131e329 worked.
On the other hand, we're not making progress on the remaining old ones
anymore.
Currently unmaintained files by extension, with a long tail that doesn't
add up to anything interesting omitted:
#files percent
ext unmaintained total unmaintained
h 329 2504 13%
c 246 3588 7%
rst 103 240 43%
<none> 95 716 13%
build 52 211 25%
mak 47 104 45%
decode 44 77 57%
txt 23 53 43%
bin 20 27 75%
rom 15 15 100%
inc 14 147 10%
cocci 14 23 61%
Observations:
1. More unmaintained .h than .c. Suggests sloppy accounting in
MAINTAINERS. Low-hanging fruit?
2. The number of unmaintained .rst and .txt suggests we're less
interested in maintaining documentation.
3. The number of unmaintained .build and .mak suggests we're less
interested in maintaining the build system.
Where are the remaining unmaintained files now? Top-scoring
directories, files in sub-directories not counted:
$ sed 's,/[^/]*$,/,;s,^[^/]*$,./,' unmaintained-files | sort | uniq -c |
sort -nr
# directory
84 include/qemu/
56 util/
50 pc-bios/
46 tests/unit/
45 tests/decode/
40 include/standard-headers/linux/
38 docs/system/
35 pc-bios/keymaps/
30 docs/devel/
26 configs/targets/
26 ./
25 roms/
22 target/i386/
22 hw/core/
19 scripts/
19 include/exec/
19 hw/display/
14 tests/multiboot/
14 scripts/coccinelle/
14 include/sysemu/
14 include/hw/
12 po/
12 hw/misc/
12 hw/intc/
12 docs/
11 pc-bios/optionrom/
11 docs/specs/
10 tests/tcg/riscv64/
10 tests/tcg/ppc64/
10 disas/
Which unmaintained files are we still changing? Unmaintained files
sorted by number of commits in the past year (since commit 5433af7697b):
$ for i in `cat unmaintained-files`; do echo -n "$i "; git-rev-list 5433af7697b.. $i
| wc -l; done | awk '{ printf "%7d %s\n", $2, $1 }' | sort -rn
186 MAINTAINERS
65 target/i386/cpu.c
54 qemu-options.hx
45 target/i386/cpu.h
22 tests/unit/test-bdrv-drain.c
21 target/i386/ops_sse.h
21 VERSION
19 tests/unit/test-cutils.c
19 include/monitor/hmp.h
18 docs/system/arm/emulation.rst
16 include/qemu/osdep.h
16 hw/misc/meson.build
15 hw/virtio/meson.build
14 util/meson.build
12 include/qemu/typedefs.h
12 docs/about/removed-features.rst
11 util/cutils.c
10 tests/unit/test-block-iothread.c
[82 more with fewer than 10 changes]
Several of these we clearly need to cover in MAINTAINERS.
Full list of unmaintained files: