]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bpf: do not update state->loop_entry in get_loop_entry()
authorEduard Zingerman <eddyz87@gmail.com>
Sat, 15 Feb 2025 11:03:58 +0000 (03:03 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 19 Feb 2025 03:22:59 +0000 (19:22 -0800)
commit590eee4268368cfa05db4d4c5524c86e8d94a0bd
tree39c24f024295b1817de6cdeb5804b96f94300131
parentbb7abf3049025f7e4ad91cff2d9fe8381a9278af
bpf: do not update state->loop_entry in get_loop_entry()

The patch 9 is simpler if less places modify loop_entry field.
The loop deleted by this patch does not affect correctness, but is a
performance optimization. However, measurements on selftests and
sched_ext programs show that this optimization is unnecessary:
- at most 2 steps are done in get_loop_entry();
- most of the time 0 or 1 steps are done in get_loop_entry().

Measured using "do-not-submit" patches from here:
https://github.com/eddyz87/bpf/tree/get-loop-entry-hungup

Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20250215110411.3236773-8-eddyz87@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c