From bae72d3c34f74fe9d0aa6392bd7f8808532ab2a4 Mon Sep 17 00:00:00 2001 From: Anay Wadhera Date: Thu, 20 May 2021 21:55:29 -0700 Subject: Revert "bpf: avoid false sharing of map refcount with max_entries" This reverts commit 96d9b2338bed553c37f759127d8d18c857449ceb. Signed-off-by: Chatur27 --- include/linux/bpf.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'include/linux') 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 { -- cgit v1.2.3