svn commit: r244031 - head/sys/netinet
Pawel Jakub Dawidek
pjd at FreeBSD.org
Sat Dec 8 12:51:08 UTC 2012
Author: pjd
Date: Sat Dec 8 12:51:06 2012
New Revision: 244031
URL: http://svnweb.freebsd.org/changeset/base/244031
Log:
More warnings for zones that depend on the kern.ipc.maxsockets limit.
Obtained from: WHEEL Systems
Modified:
head/sys/netinet/in_pcb.c
head/sys/netinet/tcp_subr.c
head/sys/netinet/udp_usrreq.c
Modified: head/sys/netinet/in_pcb.c
==============================================================================
--- head/sys/netinet/in_pcb.c Sat Dec 8 10:28:21 2012 (r244030)
+++ head/sys/netinet/in_pcb.c Sat Dec 8 12:51:06 2012 (r244031)
@@ -236,6 +236,8 @@ in_pcbinfo_init(struct inpcbinfo *pcbinf
NULL, NULL, inpcbzone_init, inpcbzone_fini, UMA_ALIGN_PTR,
inpcbzone_flags);
uma_zone_set_max(pcbinfo->ipi_zone, maxsockets);
+ uma_zone_set_warning(pcbinfo->ipi_zone,
+ "kern.ipc.maxsockets limit reached");
}
/*
Modified: head/sys/netinet/tcp_subr.c
==============================================================================
--- head/sys/netinet/tcp_subr.c Sat Dec 8 10:28:21 2012 (r244030)
+++ head/sys/netinet/tcp_subr.c Sat Dec 8 12:51:06 2012 (r244031)
@@ -367,6 +367,7 @@ tcp_init(void)
V_tcpcb_zone = uma_zcreate("tcpcb", sizeof(struct tcpcb_mem),
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
uma_zone_set_max(V_tcpcb_zone, maxsockets);
+ uma_zone_set_warning(V_tcpcb_zone, "kern.ipc.maxsockets limit reached");
tcp_tw_init();
syncache_init();
Modified: head/sys/netinet/udp_usrreq.c
==============================================================================
--- head/sys/netinet/udp_usrreq.c Sat Dec 8 10:28:21 2012 (r244030)
+++ head/sys/netinet/udp_usrreq.c Sat Dec 8 12:51:06 2012 (r244031)
@@ -191,6 +191,7 @@ udp_init(void)
V_udpcb_zone = uma_zcreate("udpcb", sizeof(struct udpcb),
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
uma_zone_set_max(V_udpcb_zone, maxsockets);
+ uma_zone_set_warning(V_udpcb_zone, "kern.ipc.maxsockets limit reached");
EVENTHANDLER_REGISTER(maxsockets_change, udp_zone_change, NULL,
EVENTHANDLER_PRI_ANY);
}
More information about the svn-src-all
mailing list