bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Björn Töpel" <bjorn.topel@gmail.com>
To: Netdev <netdev@vger.kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>
Cc: bpf <bpf@vger.kernel.org>,
	"Magnus Karlsson" <magnus.karlsson@gmail.com>,
	"Karlsson, Magnus" <magnus.karlsson@intel.com>,
	"Jonathan Lemon" <jonathan.lemon@gmail.com>,
	"Edward Cree" <ecree@solarflare.com>,
	"Toke Høiland-Jørgensen" <thoiland@redhat.com>,
	"Jesper Dangaard Brouer" <brouer@redhat.com>,
	"Andrii Nakryiko" <andrii.nakryiko@gmail.com>
Subject: Re: [PATCH bpf-next v4 0/6] Introduce the BPF dispatcher
Date: Wed, 11 Dec 2019 13:33:36 +0100	[thread overview]
Message-ID: <CAJ+HfNg42ycM+3-FP8VsxcuN2CM83hgtLVBo_KyukrOdO6MQBQ@mail.gmail.com> (raw)
In-Reply-To: <20191211123017.13212-1-bjorn.topel@gmail.com>

On Wed, 11 Dec 2019 at 13:30, Björn Töpel <bjorn.topel@gmail.com> wrote:
>
[...]
>
> xdp-perf runs, aliged vs non-aligned jump targets
> -------------------------------------------------
>
> In this test dispatchers of different sizes, with and without jump
> target alignment, were exercised. As outlined above the function
> lookup is performed via binary search. This means that depending on
> the pointer value of the function, it can reside in the upper or lower
> part of the search table. The performed tests were:
>
> 1. aligned, mititations=auto, function entry < other entries
> 2. aligned, mititations=auto, function entry > other entries
> 3. non-aligned, mititations=auto, function entry < other entries
> 4. non-aligned, mititations=auto, function entry > other entries
> 5. aligned, mititations=off, function entry < other entries
> 6. aligned, mititations=off, function entry > other entries
> 7. non-aligned, mititations=off, function entry < other entries
> 8. non-aligned, mititations=off, function entry > other entries
>
> The micro benchmarks showed that alignment of jump target has some
> positive impact.
>
> A reply to this cover letter will contain complete data for all runs.
>

Please find all the output of "xdp-perf runs, aliged vs non-aligned
jump targets" below.

To see the alignment impact, compare
align_opneg_auto.txt/nonalign_opneg_auto.txt and
align_opneg_auto.txt/nonalign_opneg_auto.txt.


Björn

align_op1_auto.txt
# aligned jump targets, mitigations=auto, prog->bpf_func < other entries
# column 1: number entries in dispatcher
# column 2: size of dispatcher
# column 3: runtime average 1000000 XDP calls (xdp_perf)
1 18 4
2 50 4
3 98 5
4 130 4
5 162 4
6 210 4
7 258 4
8 290 4
9 322 4
10 354 4
11 402 4
12 450 5
13 482 4
14 530 4
15 562 4
16 594 4
17 642 4
18 674 4
19 706 5
20 738 4
21 786 4
22 834 4
23 882 4
24 930 4
25 962 4
26 994 4
27 1042 4
28 1090 4
29 1122 4
30 1154 4
31 1186 4
32 1218 4
33 1266 5
34 1314 5
35 1346 5
36 1378 5
37 1410 5
38 1442 5
39 1474 5
40 1506 5
41 1554 5
42 1602 5
43 1650 5
44 1698 5
45 1746 5
46 1794 5
47 1842 5
48 1890 5
49 1890 17
align_op1_off.txt
# aligned jump targets, mitigations=off, prog->bpf_func < other entries
# column 1: number entries in dispatcher
# column 2: size of dispatcher
# column 3: runtime average 1000000 XDP calls (xdp_perf)
1 18 4
2 50 4
3 98 4
4 130 4
5 162 4
6 210 4
7 258 4
8 290 4
9 322 4
10 354 4
11 402 4
12 450 4
13 482 4
14 530 4
15 562 4
16 594 4
17 642 4
18 674 4
19 706 4
20 738 4
21 786 4
22 834 4
23 882 4
24 930 4
25 962 4
26 994 4
27 1042 5
28 1090 4
29 1122 4
30 1154 4
31 1186 4
32 1218 4
33 1266 5
34 1314 5
35 1346 5
36 1378 5
37 1410 5
38 1442 5
39 1474 5
40 1506 5
41 1554 5
42 1602 5
43 1650 5
44 1698 5
45 1746 5
46 1794 5
47 1842 5
48 1890 5
49 1890 5
align_opneg_auto.txt
# aligned jump targets, mitigations=auto, prog->bpf_func > other entries
# column 1: number entries in dispatcher
# column 2: size of dispatcher
# column 3: runtime average 1000000 XDP calls (xdp_perf)
1 18 4
2 50 4
3 98 4
4 130 4
5 162 4
6 210 4
7 258 4
8 290 5
9 322 5
10 354 5
11 402 5
12 450 5
13 482 5
14 530 5
15 562 5
16 594 5
17 642 5
18 674 5
19 706 5
20 738 5
21 786 5
22 834 5
23 882 5
24 930 5
25 962 5
26 994 5
27 1042 5
28 1090 5
29 1122 5
30 1154 5
31 1186 5
32 1218 5
33 1266 5
34 1314 5
35 1346 5
36 1378 5
37 1410 6
38 1442 5
39 1474 5
40 1506 5
41 1554 5
42 1602 5
43 1650 5
44 1698 5
45 1746 6
46 1794 5
47 1842 5
48 1890 5
49 1890 17
align_opneg_off.txt
# aligned jump targets, mitigations=off, prog->bpf_func > other entries
# column 1: number entries in dispatcher
# column 2: size of dispatcher
# column 3: runtime average 1000000 XDP calls (xdp_perf)
1 18 4
2 50 4
3 98 4
4 130 4
5 162 4
6 210 4
7 258 4
8 290 5
9 322 5
10 354 5
11 402 5
12 450 5
13 482 5
14 530 5
15 562 5
16 594 5
17 642 5
18 674 5
19 706 5
20 738 5
21 786 5
22 834 5
23 882 5
24 930 5
25 962 5
26 994 5
27 1042 5
28 1090 5
29 1122 5
30 1154 5
31 1186 5
32 1218 5
33 1266 5
34 1314 5
35 1346 5
36 1378 5
37 1410 5
38 1442 5
39 1474 5
40 1506 5
41 1554 5
42 1602 5
43 1650 5
44 1698 5
45 1746 5
46 1794 5
47 1842 5
48 1890 5
49 1890 5
mail.txt
align_op1_auto.txt
# aligned jump targets, mitigations=auto, prog->bpf_func < other entries
# column 1: number entries in dispatcher
# column 2: size of dispatcher
# column 3: runtime average 1000000 XDP calls (xdp_perf)
1 18 4
2 50 4
3 98 5
4 130 4
5 162 4
6 210 4
7 258 4
8 290 4
9 322 4
10 354 4
11 402 4
12 450 5
13 482 4
14 530 4
15 562 4
16 594 4
17 642 4
18 674 4
19 706 5
20 738 4
21 786 4
22 834 4
23 882 4
24 930 4
25 962 4
26 994 4
27 1042 4
28 1090 4
29 1122 4
30 1154 4
31 1186 4
32 1218 4
33 1266 5
34 1314 5
35 1346 5
36 1378 5
37 1410 5
38 1442 5
39 1474 5
40 1506 5
41 1554 5
42 1602 5
43 1650 5
44 1698 5
45 1746 5
46 1794 5
47 1842 5
48 1890 5
49 1890 17
align_op1_off.txt
# aligned jump targets, mitigations=off, prog->bpf_func < other entries
# column 1: number entries in dispatcher
# column 2: size of dispatcher
# column 3: runtime average 1000000 XDP calls (xdp_perf)
1 18 4
2 50 4
3 98 4
4 130 4
5 162 4
6 210 4
7 258 4
8 290 4
9 322 4
10 354 4
11 402 4
12 450 4
13 482 4
14 530 4
15 562 4
16 594 4
17 642 4
18 674 4
19 706 4
20 738 4
21 786 4
22 834 4
23 882 4
24 930 4
25 962 4
26 994 4
27 1042 5
28 1090 4
29 1122 4
30 1154 4
31 1186 4
32 1218 4
33 1266 5
34 1314 5
35 1346 5
36 1378 5
37 1410 5
38 1442 5
39 1474 5
40 1506 5
41 1554 5
42 1602 5
43 1650 5
44 1698 5
45 1746 5
46 1794 5
47 1842 5
48 1890 5
49 1890 5
align_opneg_auto.txt
# aligned jump targets, mitigations=auto, prog->bpf_func > other entries
# column 1: number entries in dispatcher
# column 2: size of dispatcher
# column 3: runtime average 1000000 XDP calls (xdp_perf)
1 18 4
2 50 4
3 98 4
4 130 4
5 162 4
6 210 4
7 258 4
8 290 5
9 322 5
10 354 5
11 402 5
12 450 5
13 482 5
14 530 5
15 562 5
16 594 5
17 642 5
18 674 5
19 706 5
20 738 5
21 786 5
22 834 5
23 882 5
24 930 5
25 962 5
26 994 5
27 1042 5
28 1090 5
29 1122 5
30 1154 5
31 1186 5
32 1218 5
33 1266 5
34 1314 5
35 1346 5
36 1378 5
37 1410 6
38 1442 5
39 1474 5
40 1506 5
41 1554 5
42 1602 5
43 1650 5
44 1698 5
45 1746 6
46 1794 5
47 1842 5
48 1890 5
49 1890 17
align_opneg_off.txt
# aligned jump targets, mitigations=off, prog->bpf_func > other entries
# column 1: number entries in dispatcher
# column 2: size of dispatcher
# column 3: runtime average 1000000 XDP calls (xdp_perf)
1 18 4
2 50 4
3 98 4
4 130 4
5 162 4
6 210 4
7 258 4
8 290 5
9 322 5
10 354 5
11 402 5
12 450 5
13 482 5
14 530 5
15 562 5
16 594 5
17 642 5
18 674 5
19 706 5
20 738 5
21 786 5
22 834 5
23 882 5
24 930 5
25 962 5
26 994 5
27 1042 5
28 1090 5
29 1122 5
30 1154 5
31 1186 5
32 1218 5
33 1266 5
34 1314 5
35 1346 5
36 1378 5
37 1410 5
38 1442 5
39 1474 5
40 1506 5
41 1554 5
42 1602 5
43 1650 5
44 1698 5
45 1746 5
46 1794 5
47 1842 5
48 1890 5
49 1890 5
mail.txt
nonalign_op1_auto.txt
# non-aligned jump targets, mitigations=auto, prog->bpf_func < other entries
# column 1: number entries in dispatcher
# column 2: size of dispatcher
# column 3: runtime average 1000000 XDP calls (xdp_perf)
1 18 4
2 45 4
3 72 4
4 99 4
5 126 4
6 153 4
7 184 4
8 211 4
9 238 4
10 265 4
11 292 4
12 319 4
13 350 4
14 381 4
15 408 4
16 435 4
17 462 4
18 489 4
19 516 4
20 543 4
21 570 4
22 597 4
23 624 4
24 651 4
25 682 5
26 713 4
27 744 4
28 775 4
29 802 4
30 829 4
31 856 4
32 883 4
33 910 5
34 937 5
35 964 5
36 991 5
37 1018 5
38 1045 5
39 1072 5
40 1099 5
41 1126 5
42 1153 5
43 1180 5
44 1207 5
45 1234 5
46 1261 5
47 1288 5
48 1315 5
49 1346 5
50 1377 5
51 1408 5
52 1439 5
53 1470 5
54 1501 5
55 1532 5
56 1563 5
57 1590 5
58 1617 5
59 1644 5
60 1671 5
61 1698 5
62 1725 5
63 1752 5
64 1779 5
65 1779 17
nonalign_op1_off.txt
# non-aligned jump targets, mitigations=off, prog->bpf_func < other entries
# column 1: number entries in dispatcher
# column 2: size of dispatcher
# column 3: runtime average 1000000 XDP calls (xdp_perf)
1 18 4
2 45 4
3 72 4
4 99 4
5 126 4
6 153 4
7 184 4
8 211 4
9 238 4
10 265 4
11 292 4
12 319 4
13 350 4
14 381 4
15 408 4
16 435 4
17 462 4
18 489 4
19 516 4
20 543 4
21 570 5
22 597 5
23 624 4
24 651 4
25 682 4
26 713 4
27 744 5
28 775 4
29 802 4
30 829 4
31 856 4
32 883 4
33 910 5
34 937 5
35 964 5
36 991 5
37 1018 5
38 1045 5
39 1072 5
40 1099 5
41 1126 5
42 1153 5
43 1180 5
44 1207 5
45 1234 5
46 1261 5
47 1288 5
48 1315 5
49 1346 5
50 1377 5
51 1408 5
52 1439 5
53 1470 5
54 1501 5
55 1532 5
56 1563 5
57 1590 5
58 1617 5
59 1644 5
60 1671 5
61 1698 5
62 1725 5
63 1752 5
64 1779 5
65 1779 5
nonalign_opneg_auto.txt
# non-aligned jump targets, mitigations=auto, prog->bpf_func > other entries
# column 1: number entries in dispatcher
# column 2: size of dispatcher
# column 3: runtime average 1000000 XDP calls (xdp_perf)
1 18 4
2 45 4
3 72 4
4 99 4
5 126 4
6 153 4
7 184 5
8 211 5
9 238 5
10 265 5
11 292 5
12 319 5
13 350 5
14 381 5
15 408 5
16 435 5
17 462 6
18 489 6
19 516 6
20 543 6
21 570 5
22 597 5
23 624 6
24 651 5
25 682 5
26 713 5
27 744 5
28 775 6
29 802 5
30 829 5
31 856 5
32 883 5
33 910 6
34 937 6
35 964 6
36 991 7
37 1018 5
38 1045 5
39 1072 6
40 1099 6
41 1126 6
42 1153 6
43 1180 6
44 1207 5
45 1234 5
46 1261 6
47 1288 6
48 1315 6
49 1346 6
50 1377 7
51 1408 6
52 1439 6
53 1470 6
54 1501 6
55 1532 5
56 1563 5
57 1590 6
58 1617 6
59 1644 6
60 1671 6
61 1698 6
62 1725 5
63 1752 5
64 1779 6
65 1779 17
nonalign_opneg_off.txt
# non-aligned jump targets, mitigations=off, prog->bpf_func > other entries
# column 1: number entries in dispatcher
# column 2: size of dispatcher
# column 3: runtime average 1000000 XDP calls (xdp_perf)
1 18 4
2 45 4
3 72 4
4 99 4
5 126 4
6 153 4
7 184 4
8 211 5
9 238 5
10 265 5
11 292 5
12 319 5
13 350 5
14 381 5
15 408 5
16 435 5
17 462 6
18 489 6
19 516 6
20 543 6
21 570 6
22 597 6
23 624 5
24 651 5
25 682 5
26 713 5
27 744 6
28 775 6
29 802 5
30 829 5
31 856 5
32 883 5
33 910 6
34 937 6
35 964 6
36 991 6
37 1018 5
38 1045 5
39 1072 6
40 1099 6
41 1126 6
42 1153 5
43 1180 6
44 1207 5
45 1234 5
46 1261 7
47 1288 6
48 1315 6
49 1346 6
50 1377 7
51 1408 7
52 1439 6
53 1470 6
54 1501 6
55 1532 6
56 1563 5
57 1590 6
58 1617 6
59 1644 6
60 1671 6
61 1698 5
62 1725 5
63 1752 5
64 1779 6
65 1779 6
nonalign_op1_auto.txt
# non-aligned jump targets, mitigations=auto, prog->bpf_func < other entries
# column 1: number entries in dispatcher
# column 2: size of dispatcher
# column 3: runtime average 1000000 XDP calls (xdp_perf)
1 18 4
2 45 4
3 72 4
4 99 4
5 126 4
6 153 4
7 184 4
8 211 4
9 238 4
10 265 4
11 292 4
12 319 4
13 350 4
14 381 4
15 408 4
16 435 4
17 462 4
18 489 4
19 516 4
20 543 4
21 570 4
22 597 4
23 624 4
24 651 4
25 682 5
26 713 4
27 744 4
28 775 4
29 802 4
30 829 4
31 856 4
32 883 4
33 910 5
34 937 5
35 964 5
36 991 5
37 1018 5
38 1045 5
39 1072 5
40 1099 5
41 1126 5
42 1153 5
43 1180 5
44 1207 5
45 1234 5
46 1261 5
47 1288 5
48 1315 5
49 1346 5
50 1377 5
51 1408 5
52 1439 5
53 1470 5
54 1501 5
55 1532 5
56 1563 5
57 1590 5
58 1617 5
59 1644 5
60 1671 5
61 1698 5
62 1725 5
63 1752 5
64 1779 5
65 1779 17
nonalign_op1_off.txt
# non-aligned jump targets, mitigations=off, prog->bpf_func < other entries
# column 1: number entries in dispatcher
# column 2: size of dispatcher
# column 3: runtime average 1000000 XDP calls (xdp_perf)
1 18 4
2 45 4
3 72 4
4 99 4
5 126 4
6 153 4
7 184 4
8 211 4
9 238 4
10 265 4
11 292 4
12 319 4
13 350 4
14 381 4
15 408 4
16 435 4
17 462 4
18 489 4
19 516 4
20 543 4
21 570 5
22 597 5
23 624 4
24 651 4
25 682 4
26 713 4
27 744 5
28 775 4
29 802 4
30 829 4
31 856 4
32 883 4
33 910 5
34 937 5
35 964 5
36 991 5
37 1018 5
38 1045 5
39 1072 5
40 1099 5
41 1126 5
42 1153 5
43 1180 5
44 1207 5
45 1234 5
46 1261 5
47 1288 5
48 1315 5
49 1346 5
50 1377 5
51 1408 5
52 1439 5
53 1470 5
54 1501 5
55 1532 5
56 1563 5
57 1590 5
58 1617 5
59 1644 5
60 1671 5
61 1698 5
62 1725 5
63 1752 5
64 1779 5
65 1779 5
nonalign_opneg_auto.txt
# non-aligned jump targets, mitigations=auto, prog->bpf_func > other entries
# column 1: number entries in dispatcher
# column 2: size of dispatcher
# column 3: runtime average 1000000 XDP calls (xdp_perf)
1 18 4
2 45 4
3 72 4
4 99 4
5 126 4
6 153 4
7 184 5
8 211 5
9 238 5
10 265 5
11 292 5
12 319 5
13 350 5
14 381 5
15 408 5
16 435 5
17 462 6
18 489 6
19 516 6
20 543 6
21 570 5
22 597 5
23 624 6
24 651 5
25 682 5
26 713 5
27 744 5
28 775 6
29 802 5
30 829 5
31 856 5
32 883 5
33 910 6
34 937 6
35 964 6
36 991 7
37 1018 5
38 1045 5
39 1072 6
40 1099 6
41 1126 6
42 1153 6
43 1180 6
44 1207 5
45 1234 5
46 1261 6
47 1288 6
48 1315 6
49 1346 6
50 1377 7
51 1408 6
52 1439 6
53 1470 6
54 1501 6
55 1532 5
56 1563 5
57 1590 6
58 1617 6
59 1644 6
60 1671 6
61 1698 6
62 1725 5
63 1752 5
64 1779 6
65 1779 17
nonalign_opneg_off.txt
# non-aligned jump targets, mitigations=off, prog->bpf_func > other entries
# column 1: number entries in dispatcher
# column 2: size of dispatcher
# column 3: runtime average 1000000 XDP calls (xdp_perf)
1 18 4
2 45 4
3 72 4
4 99 4
5 126 4
6 153 4
7 184 4
8 211 5
9 238 5
10 265 5
11 292 5
12 319 5
13 350 5
14 381 5
15 408 5
16 435 5
17 462 6
18 489 6
19 516 6
20 543 6
21 570 6
22 597 6
23 624 5
24 651 5
25 682 5
26 713 5
27 744 6
28 775 6
29 802 5
30 829 5
31 856 5
32 883 5
33 910 6
34 937 6
35 964 6
36 991 6
37 1018 5
38 1045 5
39 1072 6
40 1099 6
41 1126 6
42 1153 5
43 1180 6
44 1207 5
45 1234 5
46 1261 7
47 1288 6
48 1315 6
49 1346 6
50 1377 7
51 1408 7
52 1439 6
53 1470 6
54 1501 6
55 1532 6
56 1563 5
57 1590 6
58 1617 6
59 1644 6
60 1671 6
61 1698 5
62 1725 5
63 1752 5
64 1779 6
65 1779 6

      parent reply	other threads:[~2019-12-11 12:33 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-11 12:30 [PATCH bpf-next v4 0/6] Introduce the BPF dispatcher Björn Töpel
2019-12-11 12:30 ` [PATCH bpf-next v4 1/6] bpf: move trampoline JIT image allocation to a function Björn Töpel
2019-12-11 12:30 ` [PATCH bpf-next v4 2/6] bpf: introduce BPF dispatcher Björn Töpel
2019-12-11 13:26   ` Toke Høiland-Jørgensen
2019-12-13  8:23     ` Björn Töpel
2019-12-13  5:30   ` Alexei Starovoitov
2019-12-13  7:51     ` Björn Töpel
2019-12-13 15:04       ` Alexei Starovoitov
2019-12-13 15:49         ` Björn Töpel
2019-12-13 15:51           ` Alexei Starovoitov
2019-12-13 15:59             ` Björn Töpel
2019-12-13 16:03               ` Alexei Starovoitov
2019-12-13 16:09                 ` Björn Töpel
2019-12-13 17:18                   ` Alexei Starovoitov
2022-08-15 14:13   ` Steven Rostedt
2022-08-15 14:31     ` Alexei Starovoitov
2022-08-15 14:56       ` Peter Zijlstra
2022-08-15 15:16       ` Steven Rostedt
2022-08-15 15:19         ` Alexei Starovoitov
2022-08-15 15:21         ` Steven Rostedt
2022-08-15 15:39         ` Steven Rostedt
2019-12-11 12:30 ` [PATCH bpf-next v4 3/6] bpf, xdp: start using the BPF dispatcher for XDP Björn Töpel
2019-12-11 12:30 ` [PATCH bpf-next v4 4/6] bpf: start using the BPF dispatcher in BPF_TEST_RUN Björn Töpel
2019-12-11 12:30 ` [PATCH bpf-next v4 5/6] selftests: bpf: add xdp_perf test Björn Töpel
2019-12-11 12:30 ` [PATCH bpf-next v4 6/6] bpf, x86: align dispatcher branch targets to 16B Björn Töpel
2019-12-11 12:33 ` Björn Töpel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJ+HfNg42ycM+3-FP8VsxcuN2CM83hgtLVBo_KyukrOdO6MQBQ@mail.gmail.com \
    --to=bjorn.topel@gmail.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=brouer@redhat.com \
    --cc=daniel@iogearbox.net \
    --cc=ecree@solarflare.com \
    --cc=jonathan.lemon@gmail.com \
    --cc=magnus.karlsson@gmail.com \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=thoiland@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).