aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sock.h
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-03-28 19:38:17 -0400
committerDavid S. Miller <davem@davemloft.net>2008-03-28 19:38:17 -0400
commit13ff3d6fa4e6d8b6ee7c64245a0078e6a0e6f977 (patch)
treec52580ac89aff1b4eabbd94e6cb73af15e91051f /include/net/sock.h
parentbc578a54f0fd489d0722303f9a52508495ccaf9a (diff)
[SOCK]: Enumerate struct proto-s to facilitate percpu inuse accounting (v2).
The inuse counters are going to become a per-cpu array. Introduce an index for this array on the struct proto. To handle the case of proto register-unregister-register loop the bitmap is used. All its bits manipulations are protected with proto_list_lock and a sanity check for the bitmap being exhausted is also added. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sock.h')
-rw-r--r--include/net/sock.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index 1c9d059223ee..abc6341f536f 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -562,6 +562,7 @@ struct proto {
562 562
563 /* Keeping track of sockets in use */ 563 /* Keeping track of sockets in use */
564#ifdef CONFIG_PROC_FS 564#ifdef CONFIG_PROC_FS
565 unsigned int inuse_idx;
565 struct pcounter inuse; 566 struct pcounter inuse;
566#endif 567#endif
567 568