rhashtable: reorganize struct rhashtable layout
authorEric Dumazet <edumazet@google.com>
Wed, 10 Oct 2018 19:30:03 +0000 (12:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Oct 2018 07:13:25 +0000 (09:13 +0200)
commit6060bcdcffaba68c3ff158a88faab6df27210ffc
tree5a2225b1382fdd96cc45acc5ec6624247618a644
parentcbc45497b39c4626adaeca2a409588f19ae19e34
rhashtable: reorganize struct rhashtable layout

While under frags DDOS I noticed unfortunate false sharing between
@nelems and @params.automatic_shrinking

Move @nelems at the end of struct rhashtable so that first cache line
is shared between all cpus, because almost never dirtied.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit e5d672a0780d9e7118caad4c171ec88b8299398d)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/rhashtable.h