Accelerate attaching/detaching kprobes#277
Conversation
5e0a536 to
7db659a
Compare
|
Hi @jschwinger233 , could you give me a hand to check why it failed to run --filter-ifname case? |
|
@Asphaltt Thanks for the PR! Could you rebase your PR against the latest |
3c02b29 to
299fc47
Compare
b388da2 to
dc1371d
Compare
|
Hi, brb, I'll continue on this PR after my PTO. Thanks. |
|
Hey @Asphaltt , sorry, I was lagging w/ reviews (ETOOBUSYATWORK). The bpf-next CI failure should be unrelated to your changes, as I am seeing the same failure on other branches. So, something got broken in the bpf-next kernel. |
|
bpf-next failure - #284. |
dc1371d to
e06b603
Compare
|
bpf-next-main failure looks like a lvh problem, I hit the same at another project. Using the latest version like |
|
Yep, bpf-next is failing due to #284 (I haven't found time to fix it yet 😞 )
Interesting. Could you |
|
@Asphaltt Could you rebase? |
|
@Asphaltt 👋 Could you rebase? |
|
I will rebase it later, thx. |
e06b603 to
0c12b8f
Compare
In order to accelerate attaching/detaching kprobes, do attach/detach
kprobes concurrently. By concurrent way, it is a little faster than
original way.
On my 6 CPU cores VM,
run by concurrent way:
```
2023/10/25 14:16:03 Attaching kprobes (via kprobe)...
1462 / 1462 [----------------------------------------------------------------------------------------------------] 100.00% 342 p/s
2023/10/25 14:16:07 Attached (ignored 0)
2023/10/25 14:16:07 Listening for events..
SKB CPU PROCESS FUNC
^C2023/10/25 14:16:08 Received signal, exiting program..
2023/10/25 14:16:08 Detaching kprobes...
1462 / 1462 [-----------------------------------------------------------------------------------------------------] 100.00% 35 p/s
```
run by original way:
```
2023/10/25 14:17:27 Attaching kprobes (via kprobe)...
1462 / 1462 [----------------------------------------------------------------------------------------------------] 100.00% 282 p/s
2023/10/25 14:17:32 Attached (ignored 0)
2023/10/25 14:17:32 Listening for events..
SKB CPU PROCESS FUNC
^C2023/10/25 14:17:33 Received signal, exiting program..
2023/10/25 14:17:33 Detaching kprobes...
1462 / 1462 [-----------------------------------------------------------------------------------------------------] 100.00% 21 p/s
```
Signed-off-by: Leon Hwang <hffilwlqm@gmail.com>
Flush output file before closing it. Signed-off-by: Leon Hwang <hffilwlqm@gmail.com>
Signed-off-by: Leon Hwang <hffilwlqm@gmail.com>
b7c00e3 to
4ebecc7
Compare
Fix #274
In order to accelerate attaching/detaching kprobes, do attach/detach kprobes concurrently. By concurrent way, it's a little faster than original way.
On my 6 CPU cores VM,
run by concurrent way:
run by original way: