]> git.baikalelectronics.ru Git - kernel.git/commit
netlink: move nl_table in read_mostly section
authorEric Dumazet <edumazet@google.com>
Wed, 13 May 2015 00:24:50 +0000 (17:24 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 May 2015 21:49:06 +0000 (17:49 -0400)
commitd61df803ccda84ae442a9b828c555dd1f65972ab
tree1144107d6ac2f98703f314450ebb866baf6bcbad
parentc0c9e6fe4d77dda5d1ee2c1ed63d6b9754427ed8
netlink: move nl_table in read_mostly section

netlink sockets creation and deletion heavily modify nl_table_users
and nl_table_lock.

If nl_table is sharing one cache line with one of them, netlink
performance is really bad on SMP.

ffffffff81ff5f00 B nl_table
ffffffff81ff5f0c b nl_table_users

Putting nl_table in read_mostly section increased performance
of my open/delete netlink sockets test by about 80 %

This came up while diagnosing a getaddrinfo() problem.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netlink/af_netlink.c