-
Notifications
You must be signed in to change notification settings - Fork 148
fprobe: use rhashtable for fprobe_ip_table #9390
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: e8d780d |
d97a5de
to
ba11888
Compare
Upstream branch: 821c9e5 |
81b9196
to
2c43443
Compare
ba11888
to
7b5771c
Compare
Upstream branch: a6923c0 |
2c43443
to
09baef5
Compare
7b5771c
to
ccc6c10
Compare
Upstream branch: f3af62b |
09baef5
to
122e4a7
Compare
ccc6c10
to
052554f
Compare
Upstream branch: 911c035 |
122e4a7
to
41b7773
Compare
052554f
to
9008a3e
Compare
Upstream branch: 15a3b79 |
41b7773
to
f8bd848
Compare
9008a3e
to
8270ae7
Compare
Upstream branch: fa47913 |
f8bd848
to
974b732
Compare
8270ae7
to
2a0e5cd
Compare
Upstream branch: fa47913 |
974b732
to
fe1dd37
Compare
2a0e5cd
to
2562e0e
Compare
Upstream branch: 9e293d4 |
fe1dd37
to
827f080
Compare
2562e0e
to
5583eb6
Compare
Upstream branch: 3e2b799 |
827f080
to
e7ce87e
Compare
5583eb6
to
601ea2d
Compare
Upstream branch: c93c59b |
e7ce87e
to
48d737c
Compare
601ea2d
to
7390c2c
Compare
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]>
Upstream branch: bf0c2a8 |
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]>
48d737c
to
6570e51
Compare
3a736b5
to
c210f22
Compare
Pull request for series with
subject: fprobe: use rhashtable for fprobe_ip_table
version: 3
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=987294