net: mark some potential candidates __read_mostly
authorDaniel Borkmann <dborkman@redhat.com>
Thu, 29 Jan 2015 11:15:03 +0000 (12:15 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 31 Jan 2015 01:58:39 +0000 (17:58 -0800)
They are all either written once or extremly rarely (e.g. from init
code), so we can move them to the .data..read_mostly section.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipvlan/ipvlan_core.c
net/bridge/br_netlink.c
net/ipv4/devinet.c
net/ipv6/addrconf.c
net/mpls/mpls_gso.c

index 2e19528..2a17500 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "ipvlan.h"
 
-static u32 ipvlan_jhash_secret;
+static u32 ipvlan_jhash_secret __read_mostly;
 
 void ipvlan_init_secret(void)
 {
index 3875ea5..e08b260 100644 (file)
@@ -701,7 +701,7 @@ static size_t br_get_link_af_size(const struct net_device *dev)
        return pv->num_vlans * nla_total_size(sizeof(struct bridge_vlan_info));
 }
 
-static struct rtnl_af_ops br_af_ops = {
+static struct rtnl_af_ops br_af_ops __read_mostly = {
        .family                 = AF_BRIDGE,
        .get_link_af_size       = br_get_link_af_size,
 };
Simple merge
Simple merge
Simple merge