[Devel] Re: [PATCH net-2.6.26 3/6][SOCK][NETNS]: Add the percpu prot_inuse counter in the struct net.

David Miller davem at davemloft.net
Mon Mar 31 20:19:14 PDT 2008


From: Pavel Emelyanov <xemul at openvz.org>
Date: Mon, 31 Mar 2008 16:15:47 +0400

> Such an accounting would cost us two more dereferences to get the
> percpu variable from the struct net, so I make sock_prot_inuse_get
> and _add calls work differently depending on CONFIG_NET_NS - without
> it old optimized routines are used.
> 
> The per-cpu counter for init_net is prepared in core_initcall, so
> that even af_inet, that starts as fs_initcall, will already have the
> init_net prepared.
> 
> Signed-off-by: Pavel Emelyanov <xemul at openvz.org>

Applied.




More information about the Devel mailing list