aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@fb.com>2017-10-31 18:16:05 -0700
committerDavid S. Miller <davem@davemloft.net>2017-11-01 11:41:18 +0900
commit638f5b90d46016372a8e3e0a434f199cc5e12b8c (patch)
tree3624ef0d07889242a327ef94f2d228d0b6384a14 /net
parentMerge branch 'liquidio-switchdev-support' (diff)
downloadlinux-dev-638f5b90d46016372a8e3e0a434f199cc5e12b8c.tar.xz
linux-dev-638f5b90d46016372a8e3e0a434f199cc5e12b8c.zip
bpf: reduce verifier memory consumption
the verifier got progressively smarter over time and size of its internal state grew as well. Time to reduce the memory consumption. Before: sizeof(struct bpf_verifier_state) = 6520 After: sizeof(struct bpf_verifier_state) = 896 It's done by observing that majority of BPF programs use little to no stack whereas verifier kept all of 512 stack slots ready always. Instead dynamically reallocate struct verifier state when stack access is detected. Runtime difference before vs after is within a noise. The number of processed instructions stays the same. Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions