diff options
| author | Anay Wadhera <awadhera@berkeley.edu> | 2021-05-20 21:55:29 -0700 |
|---|---|---|
| committer | Michael Bestas <mkbestas@lineageos.org> | 2022-04-19 00:49:42 +0300 |
| commit | bae72d3c34f74fe9d0aa6392bd7f8808532ab2a4 (patch) | |
| tree | 69b1da56cb1a9e16bbe224e8129c7f073f42e26c /include/linux/bpf.h | |
| parent | 8a34cd948236bc071cdff745b3e2509720d74033 (diff) | |
Revert "bpf: avoid false sharing of map refcount with max_entries"
This reverts commit 96d9b2338bed553c37f759127d8d18c857449ceb.
Signed-off-by: Chatur27 <jasonbright2709@gmail.com>
Diffstat (limited to 'include/linux/bpf.h')
| -rw-r--r-- | include/linux/bpf.h | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 132585a7fbd8..f2157159b26f 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -31,25 +31,17 @@ struct bpf_map_ops { }; struct bpf_map { - /* 1st cacheline with read-mostly members of which some - * are also accessed in fast-path (e.g. ops, max_entries). - */ - const struct bpf_map_ops *ops ____cacheline_aligned; + atomic_t refcnt; enum bpf_map_type map_type; u32 key_size; u32 value_size; u32 max_entries; u32 pages; bool unpriv_array; - /* 7 bytes hole */ - - /* 2nd cacheline with misc members to avoid false sharing - * particularly with refcounting. - */ - struct user_struct *user ____cacheline_aligned; - atomic_t refcnt; - atomic_t usercnt; + struct user_struct *user; + const struct bpf_map_ops *ops; struct work_struct work; + atomic_t usercnt; }; struct bpf_map_type_list { |
