-
Notifications
You must be signed in to change notification settings - Fork 148
fprobe: use rhashtable for fprobe_ip_table #9504
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
Conversation
Upstream branch: 3ec8560 |
715d6cb
to
506c27a
Compare
Upstream branch: 1274163 |
bc3480c
to
81bcc3e
Compare
506c27a
to
76c716d
Compare
Upstream branch: d87fdb1 |
81bcc3e
to
f38bd46
Compare
76c716d
to
f3b4b37
Compare
Upstream branch: dbe99ea |
f38bd46
to
362a37f
Compare
f3b4b37
to
bf66d41
Compare
Upstream branch: 6850a33 |
362a37f
to
021a471
Compare
bf66d41
to
74b5324
Compare
Upstream branch: dbe99ea |
021a471
to
08c84cb
Compare
74b5324
to
c3c6b4b
Compare
Upstream branch: 5c42715 |
08c84cb
to
66dccc3
Compare
c3c6b4b
to
1a79214
Compare
Upstream branch: bf7a6a6 |
For now, all the kernel functions who are hooked by the fprobe will be added to the hash table "fprobe_ip_table". The key of it is the function address, and the value of it is "struct fprobe_hlist_node". The budget of the hash table is FPROBE_IP_TABLE_SIZE, which is 256. And this means the overhead of the hash table lookup will grow linearly if the count of the functions in the fprobe more than 256. When we try to hook all the kernel functions, the overhead will be huge. Therefore, replace the hash table with rhltable to reduce the overhead. Signed-off-by: Menglong Dong <[email protected]>
We need to get all the kernel function that can be traced sometimes, so we move the get_syms() and get_addrs() in kprobe_multi_test.c to trace_helpers.c and rename it to bpf_get_ksyms() and bpf_get_addrs(). Signed-off-by: Menglong Dong <[email protected]>
Some functions is recursive for the kprobe_multi and impact the benchmark results. So just skip them. Signed-off-by: Menglong Dong <[email protected]>
For now, the benchmark for kprobe-multi is single, which means there is only 1 function is hooked during testing. Add the testing "kprobe-multi-all", which will hook all the kernel functions during the benchmark. And the "kretprobe-multi-all" is added too. Signed-off-by: Menglong Dong <[email protected]>
66dccc3
to
a4d95dc
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=992227 expired. Closing PR. |
Pull request for series with
subject: fprobe: use rhashtable for fprobe_ip_table
version: 5
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=992227