OpenVZ Forum


Home » Mailing lists » Devel » [PATCH net-2.6.26 0/6][NETNS][SOCK]: Make "prot inuse" counters work per-net.
Re: [PATCH net-2.6.26 2/6][NETNS][SOCK]: Introduce per-net inuse counters. [message #28756 is a reply to message #28751] Fri, 28 March 2008 00:38 Go to previous messageGo to previous message
davem is currently offline  davem
Messages: 463
Registered: February 2006
Senior Member
From: Eric Dumazet <dada1@cosmosbay.com>
Date: Thu, 27 Mar 2008 21:21:02 +0100

> Given that :
> 
> 1) pcounter should really go away from kernel, since Andrew disagree 
> with the implementation.
> 
> 2) the need to enumerate all protocols in your enum, it seems ... ugly :)
> 
> 3) alloc_percpu(struct net_prot_inuse) per net is nice because we dont 
> waste memory (if we had to use percpu_counters for each proto for example)
> 
> I suggest to :
> 
> 1) not use pcounter anymore
> 
> 2) change 'inuse' field to 'inuse_idx' or 'prot_num' that is 
> automatically allocated at proto_register time, instead statically at 
> compile time.
> 
> Just provide a big enough NET_INUSE_NR (might depend on IPV6 present or 
> not, static or module) to take into account all possible protocols.
> 
> struct net_prot_inuse {
> 	int val[NET_INUSE_NR];
> };

I agree mostly, and I'll thus hold off on these patches
until the details are hashed out.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [PATCH 2/2 net-2.6.26] [NETNS]: Do no include NET related headers if CONFIG_NET is not set.
Next Topic: [RFC][-mm] [1/2] Simple stats for cpu resource controller
Goto Forum:
  


Current Time: Tue Aug 26 13:32:40 GMT 2025

Total time taken to generate the page: 0.10943 seconds