netfilter: hashlimit and recent net_id are mostly read
Subsystems (2)
PATCH 1/1 netfilter: hashlimit and recent net_id are mostly read
Make sure hashlimit_net_id and recent_net_id dont sit in an often written cache line.
Signed-off-by Eric Dumazet <[email protected]>
--- net/netfilter/xt_hashlimit.c | 2 +- net/netfilter/xt_recent.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
net/netfilter/xt_hashlimit.c +1 -1
@@ -48,7 +48,7 @@ struct hashlimit_net {struct proc_dir_entry *ip6t_hashlimit; }; -static int hashlimit_net_id; +static int hashlimit_net_id__read_mostly ;static inline struct hashlimit_net *hashlimit_pernet (struct net *net) {return net_generic (net, hashlimit_net_id);
net/netfilter/xt_recent.c +1 -1
@@ -88,7 +88,7 @@ struct recent_net {#endif }; -static int recent_net_id; +static int recent_net_id__read_mostly ;static inline struct recent_net *recent_pernet (struct net *net) {return net_generic (net, recent_net_id);