mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-11 13:04:03 +08:00
4199bae10c
net->core.sock_inuse is a per cpu variable (int), while net->core.prot_inuse is another per cpu variable of 64 integers. per cpu allocator tend to place them in very different places. Grouping them together makes sense, since it makes updates potentially faster, if hitting the same cache line. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
20 lines
319 B
C
20 lines
319 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __NETNS_CORE_H__
|
|
#define __NETNS_CORE_H__
|
|
|
|
struct ctl_table_header;
|
|
struct prot_inuse;
|
|
|
|
struct netns_core {
|
|
/* core sysctls */
|
|
struct ctl_table_header *sysctl_hdr;
|
|
|
|
int sysctl_somaxconn;
|
|
|
|
#ifdef CONFIG_PROC_FS
|
|
struct prot_inuse __percpu *prot_inuse;
|
|
#endif
|
|
};
|
|
|
|
#endif
|