-
Notifications
You must be signed in to change notification settings - Fork 5
bpf: Inline helper in powerpc JIT #6372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: bpf-next_base
Are you sure you want to change the base?
bpf: Inline helper in powerpc JIT #6372
Conversation
|
Upstream branch: 4722981 |
86f62c3 to
c8a7e22
Compare
|
Upstream branch: 7dc211c |
e5f50e6 to
bf7ba84
Compare
c8a7e22 to
c919396
Compare
|
Upstream branch: ec12ab2 |
bf7ba84 to
93d46eb
Compare
c919396 to
73c6b0b
Compare
|
Upstream branch: d6ec090 |
93d46eb to
7453413
Compare
73c6b0b to
0bdd2b9
Compare
|
Upstream branch: d6ec090 |
7453413 to
3d87acf
Compare
0bdd2b9 to
729c7ba
Compare
|
Upstream branch: d088da9 |
3d87acf to
47d206c
Compare
729c7ba to
623bab9
Compare
|
Upstream branch: e0940c6 |
47d206c to
2dc5254
Compare
623bab9 to
fe03c14
Compare
|
Upstream branch: 792f258 |
2dc5254 to
38fd088
Compare
fe03c14 to
65bfb85
Compare
|
Upstream branch: 878ee3c |
38fd088 to
a0ac218
Compare
65bfb85 to
b1f8b58
Compare
6e45fe5 to
ed8a47c
Compare
3282beb to
067f842
Compare
|
Upstream branch: fad8040 |
ed8a47c to
9e2e9d0
Compare
067f842 to
3bd2c43
Compare
|
Upstream branch: acf8726 |
9e2e9d0 to
c96124c
Compare
3bd2c43 to
71c4be1
Compare
|
Upstream branch: 4617b30 |
c96124c to
8fa3978
Compare
71c4be1 to
9b3817c
Compare
|
Upstream branch: 590699d |
8fa3978 to
51061d8
Compare
9b3817c to
90dfd48
Compare
|
Upstream branch: f2cb066 |
51061d8 to
0642342
Compare
90dfd48 to
1559a3a
Compare
|
Upstream branch: 8c868a3 |
0642342 to
de62642
Compare
1559a3a to
ae9b520
Compare
|
Upstream branch: 8f6ddc0 |
de62642 to
1bdce58
Compare
ae9b520 to
399fdcb
Compare
|
Upstream branch: 5262cb2 |
1bdce58 to
61334f5
Compare
399fdcb to
8c83cb5
Compare
…PU addrs With the introduction of commit 7bdbf74 ("bpf: add special internal-only MOV instruction to resolve per-CPU addrs"), a new BPF instruction BPF_MOV64_PERCPU_REG has been added to resolve absolute addresses of per-CPU data from their per-CPU offsets. This update requires enabling support for this instruction in the powerpc JIT compiler. As of commit 7a0268f ("[PATCH] powerpc/64: per cpu data optimisations"), the per-CPU data offset for the CPU is stored in the paca. To support this BPF instruction in the powerpc JIT, the following powerpc instructions are emitted: ld tmp1_reg, 48(13) //Load per-CPU data offset from paca(r13) in tmp1_reg. add dst_reg, src_reg, tmp1_reg //Add the per cpu offset to the dst. mr dst_reg, src_reg //Move src_reg to dst_reg, if src_reg != dst_reg To evaluate the performance improvements introduced by this change, the benchmark described in [1] was employed. Before Change: glob-arr-inc : 41.580 ± 0.034M/s arr-inc : 39.592 ± 0.055M/s hash-inc : 25.873 ± 0.012M/s After Change: glob-arr-inc : 42.024 ± 0.049M/s arr-inc : 55.447 ± 0.031M/s hash-inc : 26.565 ± 0.014M/s [1] anakryiko/linux@8dec900975ef Signed-off-by: Saket Kumar Bhaskar <[email protected]>
|
Upstream branch: 688b745 |
…task() Inline the calls to bpf_get_smp_processor_id()/bpf_get_current_task() in the powerpc bpf jit. powerpc saves the Logical processor number (paca_index) and pointer to current task (__current) in paca. Here is how the powerpc JITed assembly changes after this commit: Before: cpu = bpf_get_smp_processor_id(); addis 12, 2, -517 addi 12, 12, -29456 mtctr 12 bctrl mr 8, 3 After: cpu = bpf_get_smp_processor_id(); lhz 8, 8(13) To evaluate the performance improvements introduced by this change, the benchmark described in [1] was employed. +---------------+-------------------+-------------------+--------------+ | Name | Before | After | % change | |---------------+-------------------+-------------------+--------------| | glob-arr-inc | 40.701 ± 0.008M/s | 55.207 ± 0.021M/s | + 35.64% | | arr-inc | 39.401 ± 0.007M/s | 56.275 ± 0.023M/s | + 42.42% | | hash-inc | 24.944 ± 0.004M/s | 26.212 ± 0.003M/s | + 5.08% | +---------------+-------------------+-------------------+--------------+ [1] anakryiko/linux@8dec900975ef Signed-off-by: Saket Kumar Bhaskar <[email protected]>
61334f5 to
bb62a24
Compare
Pull request for series with
subject: bpf: Inline helper in powerpc JIT
version: 2
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1024110