forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 466
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
No more free serial devices #267
Comments
wens
pushed a commit
that referenced
this issue
Jun 8, 2017
split __bpf_prog_run() interpreter into stack allocation and execution parts. The code section shrinks which helps interpreter performance in some cases. text data bss dec hex filename 26350 10328 624 37302 91b6 kernel/bpf/core.o.before 25777 10328 624 36729 8f79 kernel/bpf/core.o.after Very short programs got slower (due to extra function call): Before: test_bpf: #89 ALU64_ADD_K: 1 + 2 = 3 jited:0 7 PASS test_bpf: #90 ALU64_ADD_K: 3 + 0 = 3 jited:0 8 PASS test_bpf: #91 ALU64_ADD_K: 1 + 2147483646 = 2147483647 jited:0 7 PASS test_bpf: #92 ALU64_ADD_K: 4294967294 + 2 = 4294967296 jited:0 11 PASS test_bpf: #93 ALU64_ADD_K: 2147483646 + -2147483647 = -1 jited:0 7 PASS After: test_bpf: #89 ALU64_ADD_K: 1 + 2 = 3 jited:0 11 PASS test_bpf: #90 ALU64_ADD_K: 3 + 0 = 3 jited:0 11 PASS test_bpf: #91 ALU64_ADD_K: 1 + 2147483646 = 2147483647 jited:0 11 PASS test_bpf: #92 ALU64_ADD_K: 4294967294 + 2 = 4294967296 jited:0 14 PASS test_bpf: #93 ALU64_ADD_K: 2147483646 + -2147483647 = -1 jited:0 10 PASS Longer programs got faster: Before: test_bpf: #266 BPF_MAXINSNS: Ctx heavy transformations jited:0 20286 20513 PASS test_bpf: #267 BPF_MAXINSNS: Call heavy transformations jited:0 31853 31768 PASS test_bpf: #268 BPF_MAXINSNS: Jump heavy test jited:0 9815 PASS test_bpf: #269 BPF_MAXINSNS: Very long jump backwards jited:0 6 PASS test_bpf: #270 BPF_MAXINSNS: Edge hopping nuthouse jited:0 13959 PASS test_bpf: #271 BPF_MAXINSNS: Jump, gap, jump, ... jited:0 210 PASS test_bpf: #272 BPF_MAXINSNS: ld_abs+get_processor_id jited:0 21724 PASS test_bpf: #273 BPF_MAXINSNS: ld_abs+vlan_push/pop jited:0 19118 PASS After: test_bpf: #266 BPF_MAXINSNS: Ctx heavy transformations jited:0 19008 18827 PASS test_bpf: #267 BPF_MAXINSNS: Call heavy transformations jited:0 29238 28450 PASS test_bpf: #268 BPF_MAXINSNS: Jump heavy test jited:0 9485 PASS test_bpf: #269 BPF_MAXINSNS: Very long jump backwards jited:0 12 PASS test_bpf: #270 BPF_MAXINSNS: Edge hopping nuthouse jited:0 13257 PASS test_bpf: #271 BPF_MAXINSNS: Jump, gap, jump, ... jited:0 213 PASS test_bpf: #272 BPF_MAXINSNS: ld_abs+get_processor_id jited:0 19389 PASS test_bpf: #273 BPF_MAXINSNS: ld_abs+vlan_push/pop jited:0 19583 PASS For real world production programs the difference is noise. This patch is first step towards reducing interpreter stack consumption. Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
jwrdegoede
pushed a commit
to jwrdegoede/linux-sunxi
that referenced
this issue
Oct 9, 2023
Add various tests to check maximum number of supported programs being attached: # ./vmtest.sh -- ./test_progs -t tc_opts [...] ./test_progs -t tc_opts [ 1.185325] bpf_testmod: loading out-of-tree module taints kernel. [ 1.186826] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel [ 1.270123] tsc: Refined TSC clocksource calibration: 3407.988 MHz [ 1.272428] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fc932722, max_idle_ns: 440795381586 ns [ 1.276408] clocksource: Switched to clocksource tsc linux-sunxi#252 tc_opts_after:OK linux-sunxi#253 tc_opts_append:OK linux-sunxi#254 tc_opts_basic:OK linux-sunxi#255 tc_opts_before:OK linux-sunxi#256 tc_opts_chain_classic:OK linux-sunxi#257 tc_opts_chain_mixed:OK linux-sunxi#258 tc_opts_delete_empty:OK linux-sunxi#259 tc_opts_demixed:OK linux-sunxi#260 tc_opts_detach:OK linux-sunxi#261 tc_opts_detach_after:OK linux-sunxi#262 tc_opts_detach_before:OK linux-sunxi#263 tc_opts_dev_cleanup:OK linux-sunxi#264 tc_opts_invalid:OK linux-sunxi#265 tc_opts_max:OK <--- (new test) linux-sunxi#266 tc_opts_mixed:OK linux-sunxi#267 tc_opts_prepend:OK linux-sunxi#268 tc_opts_replace:OK linux-sunxi#269 tc_opts_revision:OK Summary: 18/0 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20230929204121.20305-2-daniel@iogearbox.net
jwrdegoede
pushed a commit
to jwrdegoede/linux-sunxi
that referenced
this issue
Oct 25, 2023
Add a new test case which performs double query of the bpf_mprog through libbpf API, but also via raw bpf(2) syscall. This is testing to gather first the count and then in a subsequent probe the full information with the program array without clearing passed structs in between. # ./vmtest.sh -- ./test_progs -t tc_opts [...] ./test_progs -t tc_opts [ 1.398818] tsc: Refined TSC clocksource calibration: 3407.999 MHz [ 1.400263] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fd336761, max_idle_ns: 440795243819 ns [ 1.402734] clocksource: Switched to clocksource tsc [ 1.426639] bpf_testmod: loading out-of-tree module taints kernel. [ 1.428112] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel linux-sunxi#252 tc_opts_after:OK linux-sunxi#253 tc_opts_append:OK linux-sunxi#254 tc_opts_basic:OK linux-sunxi#255 tc_opts_before:OK linux-sunxi#256 tc_opts_chain_classic:OK linux-sunxi#257 tc_opts_chain_mixed:OK linux-sunxi#258 tc_opts_delete_empty:OK linux-sunxi#259 tc_opts_demixed:OK linux-sunxi#260 tc_opts_detach:OK linux-sunxi#261 tc_opts_detach_after:OK linux-sunxi#262 tc_opts_detach_before:OK linux-sunxi#263 tc_opts_dev_cleanup:OK linux-sunxi#264 tc_opts_invalid:OK linux-sunxi#265 tc_opts_max:OK linux-sunxi#266 tc_opts_mixed:OK linux-sunxi#267 tc_opts_prepend:OK linux-sunxi#268 tc_opts_query:OK <--- (new test) linux-sunxi#269 tc_opts_replace:OK linux-sunxi#270 tc_opts_revision:OK Summary: 19/0 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/r/20231006220655.1653-4-daniel@iogearbox.net Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
jwrdegoede
pushed a commit
to jwrdegoede/linux-sunxi
that referenced
this issue
Oct 25, 2023
Add a new test case to query on an empty bpf_mprog and pass the revision directly into expected_revision for attachment to assert that this does succeed. ./test_progs -t tc_opts [ 1.406778] tsc: Refined TSC clocksource calibration: 3407.990 MHz [ 1.408863] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fcaf6eb0, max_idle_ns: 440795321766 ns [ 1.412419] clocksource: Switched to clocksource tsc [ 1.428671] bpf_testmod: loading out-of-tree module taints kernel. [ 1.430260] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel linux-sunxi#252 tc_opts_after:OK linux-sunxi#253 tc_opts_append:OK linux-sunxi#254 tc_opts_basic:OK linux-sunxi#255 tc_opts_before:OK linux-sunxi#256 tc_opts_chain_classic:OK linux-sunxi#257 tc_opts_chain_mixed:OK linux-sunxi#258 tc_opts_delete_empty:OK linux-sunxi#259 tc_opts_demixed:OK linux-sunxi#260 tc_opts_detach:OK linux-sunxi#261 tc_opts_detach_after:OK linux-sunxi#262 tc_opts_detach_before:OK linux-sunxi#263 tc_opts_dev_cleanup:OK linux-sunxi#264 tc_opts_invalid:OK linux-sunxi#265 tc_opts_max:OK linux-sunxi#266 tc_opts_mixed:OK linux-sunxi#267 tc_opts_prepend:OK linux-sunxi#268 tc_opts_query:OK linux-sunxi#269 tc_opts_query_attach:OK <--- (new test) linux-sunxi#270 tc_opts_replace:OK linux-sunxi#271 tc_opts_revision:OK Summary: 20/0 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/r/20231006220655.1653-6-daniel@iogearbox.net Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Kernel reports no more free serial devices for with minor numbers way below 512 for PL2303 serial tty interface.
Mainline discussion:
http://marc.info/?l=linux-usb&m=146844268111849&w=2
The text was updated successfully, but these errors were encountered: