diff options
author | Alexei Starovoitov <ast@kernel.org> | 2021-02-10 06:36:26 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2021-02-11 18:17:50 +0300 |
commit | 700d4796ef59f5faf240d307839bd419e2b6bdff (patch) | |
tree | dc3d98f6691576479f2b727ce0d9ce7726b33ad7 /include/linux/bpf.h | |
parent | 6df8fb83301d68ea0a0c0e1cbcc790fcc333ed12 (diff) | |
download | linux-700d4796ef59f5faf240d307839bd419e2b6bdff.tar.xz |
bpf: Optimize program stats
Move bpf_prog_stats from prog->aux into prog to avoid one extra load
in critical path of program execution.
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210210033634.62081-2-alexei.starovoitov@gmail.com
Diffstat (limited to 'include/linux/bpf.h')
-rw-r--r-- | include/linux/bpf.h | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 079162bbd387..5a388955e6b6 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -14,7 +14,6 @@ #include <linux/numa.h> #include <linux/mm_types.h> #include <linux/wait.h> -#include <linux/u64_stats_sync.h> #include <linux/refcount.h> #include <linux/mutex.h> #include <linux/module.h> @@ -507,12 +506,6 @@ enum bpf_cgroup_storage_type { */ #define MAX_BPF_FUNC_ARGS 12 -struct bpf_prog_stats { - u64 cnt; - u64 nsecs; - struct u64_stats_sync syncp; -} __aligned(2 * sizeof(u64)); - struct btf_func_model { u8 ret_size; u8 nr_args; @@ -845,7 +838,6 @@ struct bpf_prog_aux { u32 linfo_idx; u32 num_exentries; struct exception_table_entry *extable; - struct bpf_prog_stats __percpu *stats; union { struct work_struct work; struct rcu_head rcu; |