Commit d2d83be
committed
pahole: Allow tweaking the size of the loader hash tables
To experiment with different sizes as time goes by and the number of symbols in
the kernel grows.
The current default, 15, is suboptimal for the fedora rawhide kernel, we can do
better using 12.
Default: 15:
$ sudo ~acme/bin/perf stat -d -r5 pahole -j --btf_encode_detached vmlinux-j.btf vmlinux
Performance counter stats for 'pahole -j --btf_encode_detached vmlinux-j.btf vmlinux' (5 runs):
8,107.73 msec task-clock # 2.749 CPUs utilized ( +- 0.05% )
1,723 context-switches # 212.562 /sec ( +- 1.86% )
5 cpu-migrations # 0.641 /sec ( +- 46.07% )
68,802 page-faults # 8.486 K/sec ( +- 0.05% )
29,221,590,880 cycles # 3.604 GHz ( +- 0.04% )
63,438,138,612 instructions # 2.17 insn per cycle ( +- 0.00% )
15,125,172,105 branches # 1.866 G/sec ( +- 0.00% )
119,983,284 branch-misses # 0.79% of all branches ( +- 0.06% )
13,964,248,638 L1-dcache-loads # 1.722 G/sec ( +- 0.00% )
375,110,346 L1-dcache-load-misses # 2.69% of all L1-dcache accesses( +- 0.01% )
91,712,402 LLC-loads # 11.312 M/sec ( +- 0.14% )
28,025,289 LLC-load-misses # 30.56% of all LL-cache accesses ( +- 0.23% )
2.94980 +- 0.00193 seconds time elapsed ( +- 0.07% )
$
New default, to be set in an upcoming patch, 12:
$ sudo ~acme/bin/perf stat -d -r5 pahole --hashbits=12 -j --btf_encode_detached vmlinux-j.btf vmlinux
Performance counter stats for 'pahole --hashbits=12 -j --btf_encode_detached vmlinux-j.btf vmlinux' (5 runs):
7,687.31 msec task-clock # 2.704 CPUs utilized ( +- 0.02% )
1,677 context-switches # 218.126 /sec ( +- 0.70% )
4 cpu-migrations # 0.468 /sec ( +- 18.84% )
67,827 page-faults # 8.823 K/sec ( +- 0.03% )
27,711,744,058 cycles # 3.605 GHz ( +- 0.02% )
63,032,539,630 instructions # 2.27 insn per cycle ( +- 0.00% )
15,062,001,666 branches # 1.959 G/sec ( +- 0.00% )
127,728,818 branch-misses # 0.85% of all branches ( +- 0.07% )
13,972,184,314 L1-dcache-loads # 1.818 G/sec ( +- 0.00% )
364,962,883 L1-dcache-load-misses # 2.61% of all L1-dcache accesses( +- 0.02% )
83,969,109 LLC-loads # 10.923 M/sec ( +- 0.13% )
19,141,055 LLC-load-misses # 22.80% of all LL-cache accesses ( +- 0.25% )
2.842440 +- 0.000952 seconds time elapsed ( +- 0.03% )
$ sudo ~acme/bin/perf stat -d -r5 pahole --hashbits=11 -j --btf_encode_detached vmlinux-j.btf vmlinux
Performance counter stats for 'pahole --hashbits=11 -j --btf_encode_detached vmlinux-j.btf vmlinux' (5 runs):
7,704.29 msec task-clock # 2.702 CPUs utilized ( +- 0.05% )
1,676 context-switches # 217.515 /sec ( +- 1.04% )
2 cpu-migrations # 0.286 /sec ( +- 17.01% )
67,813 page-faults # 8.802 K/sec ( +- 0.05% )
27,786,710,102 cycles # 3.607 GHz ( +- 0.05% )
63,027,795,038 instructions # 2.27 insn per cycle ( +- 0.00% )
15,066,316,987 branches # 1.956 G/sec ( +- 0.00% )
130,431,772 branch-misses # 0.87% of all branches ( +- 0.20% )
13,981,516,517 L1-dcache-loads # 1.815 G/sec ( +- 0.00% )
369,525,466 L1-dcache-load-misses # 2.64% of all L1-dcache accesses( +- 0.03% )
83,328,524 LLC-loads # 10.816 M/sec ( +- 0.27% )
18,704,020 LLC-load-misses # 22.45% of all LL-cache accesses ( +- 0.18% )
2.85109 +- 0.00281 seconds time elapsed ( +- 0.10% )
$ sudo ~acme/bin/perf stat -d -r5 pahole --hashbits=8 -j --btf_encode_detached vmlinux-j.btf vmlinux
Performance counter stats for 'pahole --hashbits=8 -j --btf_encode_detached vmlinux-j.btf vmlinux' (5 runs):
8,190.55 msec task-clock # 2.774 CPUs utilized ( +- 0.03% )
1,607 context-switches # 196.226 /sec ( +- 0.67% )
3 cpu-migrations # 0.317 /sec ( +- 15.38% )
67,869 page-faults # 8.286 K/sec ( +- 0.05% )
29,511,213,192 cycles # 3.603 GHz ( +- 0.02% )
63,347,196,598 instructions # 2.15 insn per cycle ( +- 0.00% )
15,198,023,498 branches # 1.856 G/sec ( +- 0.00% )
131,113,100 branch-misses # 0.86% of all branches ( +- 0.14% )
14,118,162,884 L1-dcache-loads # 1.724 G/sec ( +- 0.00% )
422,048,384 L1-dcache-load-misses # 2.99% of all L1-dcache accesses( +- 0.01% )
105,878,910 LLC-loads # 12.927 M/sec ( +- 0.05% )
21,022,664 LLC-load-misses # 19.86% of all LL-cache accesses ( +- 0.20% )
2.952678 +- 0.000858 seconds time elapsed ( +- 0.03% )
$ sudo ~acme/bin/perf stat -d -r5 pahole --hashbits=13 -j --btf_encode_detached vmlinux-j.btf vmlinux
Performance counter stats for 'pahole --hashbits=13 -j --btf_encode_detached vmlinux-j.btf vmlinux' (5 runs):
7,728.71 msec task-clock # 2.707 CPUs utilized ( +- 0.07% )
1,661 context-switches # 214.887 /sec ( +- 0.70% )
2 cpu-migrations # 0.259 /sec ( +- 22.36% )
67,893 page-faults # 8.785 K/sec ( +- 0.04% )
27,874,322,843 cycles # 3.607 GHz ( +- 0.07% )
63,079,425,815 instructions # 2.26 insn per cycle ( +- 0.00% )
15,067,279,408 branches # 1.950 G/sec ( +- 0.00% )
125,706,874 branch-misses # 0.83% of all branches ( +- 1.00% )
13,967,177,801 L1-dcache-loads # 1.807 G/sec ( +- 0.00% )
363,566,754 L1-dcache-load-misses # 2.60% of all L1-dcache accesses( +- 0.02% )
86,583,482 LLC-loads # 11.203 M/sec ( +- 0.13% )
20,629,871 LLC-load-misses # 23.83% of all LL-cache accesses ( +- 0.21% )
2.85551 +- 0.00124 seconds time elapsed ( +- 0.04% )
$
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>1 parent ff7bd70 commit d2d83be
2 files changed
+21
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
130 | 137 | | |
131 | 138 | | |
132 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
900 | 900 | | |
901 | 901 | | |
902 | 902 | | |
| 903 | + | |
903 | 904 | | |
904 | 905 | | |
905 | 906 | | |
| |||
1259 | 1260 | | |
1260 | 1261 | | |
1261 | 1262 | | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
1262 | 1269 | | |
1263 | 1270 | | |
1264 | 1271 | | |
| |||
1399 | 1406 | | |
1400 | 1407 | | |
1401 | 1408 | | |
| 1409 | + | |
| 1410 | + | |
1402 | 1411 | | |
1403 | 1412 | | |
1404 | 1413 | | |
| |||
2872 | 2881 | | |
2873 | 2882 | | |
2874 | 2883 | | |
| 2884 | + | |
| 2885 | + | |
| 2886 | + | |
| 2887 | + | |
| 2888 | + | |
2875 | 2889 | | |
2876 | 2890 | | |
2877 | 2891 | | |
| |||
0 commit comments