Configure UMA warnings for the following zones:
- unp_zone: kern.ipc.maxsockets limit reached - socket_zone: kern.ipc.maxsockets limit reached - zone_mbuf: kern.ipc.nmbufs limit reached - zone_clust: kern.ipc.nmbclusters limit reached - zone_jumbop: kern.ipc.nmbjumbop limit reached - zone_jumbo9: kern.ipc.nmbjumbo9 limit reached - zone_jumbo16: kern.ipc.nmbjumbo16 limit reached Note that those warnings are printed not often than every five minutes and can be globally turned off by setting sysctl/tunable vm.zone_warnings to 0. Discussed on: arch Obtained from: WHEEL Systems MFC after: 2 weeks
This commit is contained in:
parent
2f891cd504
commit
6e0b674628
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=243999
@ -306,6 +306,7 @@ mbuf_init(void *dummy)
|
||||
MSIZE - 1, UMA_ZONE_MAXBUCKET);
|
||||
if (nmbufs > 0)
|
||||
nmbufs = uma_zone_set_max(zone_mbuf, nmbufs);
|
||||
uma_zone_set_warning(zone_mbuf, "kern.ipc.nmbufs limit reached");
|
||||
|
||||
zone_clust = uma_zcreate(MBUF_CLUSTER_MEM_NAME, MCLBYTES,
|
||||
mb_ctor_clust, mb_dtor_clust,
|
||||
@ -317,6 +318,7 @@ mbuf_init(void *dummy)
|
||||
UMA_ALIGN_PTR, UMA_ZONE_REFCNT);
|
||||
if (nmbclusters > 0)
|
||||
nmbclusters = uma_zone_set_max(zone_clust, nmbclusters);
|
||||
uma_zone_set_warning(zone_clust, "kern.ipc.nmbclusters limit reached");
|
||||
|
||||
zone_pack = uma_zsecond_create(MBUF_PACKET_MEM_NAME, mb_ctor_pack,
|
||||
mb_dtor_pack, mb_zinit_pack, mb_zfini_pack, zone_mbuf);
|
||||
@ -332,6 +334,7 @@ mbuf_init(void *dummy)
|
||||
UMA_ALIGN_PTR, UMA_ZONE_REFCNT);
|
||||
if (nmbjumbop > 0)
|
||||
nmbjumbop = uma_zone_set_max(zone_jumbop, nmbjumbop);
|
||||
uma_zone_set_warning(zone_jumbop, "kern.ipc.nmbjumbop limit reached");
|
||||
|
||||
zone_jumbo9 = uma_zcreate(MBUF_JUMBO9_MEM_NAME, MJUM9BYTES,
|
||||
mb_ctor_clust, mb_dtor_clust,
|
||||
@ -344,6 +347,7 @@ mbuf_init(void *dummy)
|
||||
uma_zone_set_allocf(zone_jumbo9, mbuf_jumbo_alloc);
|
||||
if (nmbjumbo9 > 0)
|
||||
nmbjumbo9 = uma_zone_set_max(zone_jumbo9, nmbjumbo9);
|
||||
uma_zone_set_warning(zone_jumbo9, "kern.ipc.nmbjumbo9 limit reached");
|
||||
|
||||
zone_jumbo16 = uma_zcreate(MBUF_JUMBO16_MEM_NAME, MJUM16BYTES,
|
||||
mb_ctor_clust, mb_dtor_clust,
|
||||
@ -356,6 +360,7 @@ mbuf_init(void *dummy)
|
||||
uma_zone_set_allocf(zone_jumbo16, mbuf_jumbo_alloc);
|
||||
if (nmbjumbo16 > 0)
|
||||
nmbjumbo16 = uma_zone_set_max(zone_jumbo16, nmbjumbo16);
|
||||
uma_zone_set_warning(zone_jumbo16, "kern.ipc.nmbjumbo16 limit reached");
|
||||
|
||||
zone_ext_refcnt = uma_zcreate(MBUF_EXTREFCNT_MEM_NAME, sizeof(u_int),
|
||||
NULL, NULL,
|
||||
|
@ -276,6 +276,7 @@ socket_init(void *tag)
|
||||
socket_zone = uma_zcreate("socket", sizeof(struct socket), NULL, NULL,
|
||||
NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
|
||||
maxsockets = uma_zone_set_max(socket_zone, maxsockets);
|
||||
uma_zone_set_warning(socket_zone, "kern.ipc.maxsockets limit reached");
|
||||
EVENTHANDLER_REGISTER(maxsockets_change, socket_zone_change, NULL,
|
||||
EVENTHANDLER_PRI_FIRST);
|
||||
}
|
||||
|
@ -1778,6 +1778,7 @@ unp_init(void)
|
||||
if (unp_zone == NULL)
|
||||
panic("unp_init");
|
||||
uma_zone_set_max(unp_zone, maxsockets);
|
||||
uma_zone_set_warning(unp_zone, "kern.ipc.maxsockets limit reached");
|
||||
EVENTHANDLER_REGISTER(maxsockets_change, unp_zone_change,
|
||||
NULL, EVENTHANDLER_PRI_ANY);
|
||||
LIST_INIT(&unp_dhead);
|
||||
|
Loading…
Reference in New Issue
Block a user