Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9ebafbe authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

rhashtable: ensure cache line alignment on bucket_table



struct bucket_table contains mostly read fields :

size, locks_mask, locks.

Make sure these are not sharing a cache line with buckets[]

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Acked-by: default avatarThomas Graf <tgraf@suug.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a4176a93
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -57,7 +57,8 @@ struct bucket_table {
	size_t			size;
	unsigned int		locks_mask;
	spinlock_t		*locks;
	struct rhash_head __rcu		*buckets[];

	struct rhash_head __rcu	*buckets[] ____cacheline_aligned_in_smp;
};

typedef u32 (*rht_hashfn_t)(const void *data, u32 len, u32 seed);