mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 06:21:31 +00:00
[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>
This commit is contained in:
parent
bc578a54f0
commit
13ff3d6fa4
2 changed files with 35 additions and 0 deletions
|
@ -562,6 +562,7 @@ struct proto {
|
|||
|
||||
/* Keeping track of sockets in use */
|
||||
#ifdef CONFIG_PROC_FS
|
||||
unsigned int inuse_idx;
|
||||
struct pcounter inuse;
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue