]> git.baikalelectronics.ru Git - kernel.git/commit
[SOCK]: Enumerate struct proto-s to facilitate percpu inuse accounting (v2).
authorPavel Emelyanov <xemul@openvz.org>
Fri, 28 Mar 2008 23:38:17 +0000 (16:38 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Mar 2008 23:38:17 +0000 (16:38 -0700)
commit529a2866618491f93afb5a551a179e16bcb1bac0
treec52580ac89aff1b4eabbd94e6cb73af15e91051f
parentc919852745f0f6b1f71779d7ff508d2041d515f2
[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>
include/net/sock.h
net/core/sock.c