From owner-svn-src-head@FreeBSD.ORG Fri Dec 7 22:30:31 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9B97F20A; Fri, 7 Dec 2012 22:30:31 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 755D98FC18; Fri, 7 Dec 2012 22:30:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qB7MUV75098800; Fri, 7 Dec 2012 22:30:31 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qB7MUUnY098797; Fri, 7 Dec 2012 22:30:30 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201212072230.qB7MUUnY098797@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 7 Dec 2012 22:30:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243999 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Dec 2012 22:30:31 -0000 Author: pjd Date: Fri Dec 7 22:30:30 2012 New Revision: 243999 URL: http://svnweb.freebsd.org/changeset/base/243999 Log: 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 Modified: head/sys/kern/kern_mbuf.c head/sys/kern/uipc_socket.c head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/kern_mbuf.c ============================================================================== --- head/sys/kern/kern_mbuf.c Fri Dec 7 22:27:13 2012 (r243998) +++ head/sys/kern/kern_mbuf.c Fri Dec 7 22:30:30 2012 (r243999) @@ -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, Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Fri Dec 7 22:27:13 2012 (r243998) +++ head/sys/kern/uipc_socket.c Fri Dec 7 22:30:30 2012 (r243999) @@ -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); } Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Fri Dec 7 22:27:13 2012 (r243998) +++ head/sys/kern/uipc_usrreq.c Fri Dec 7 22:30:30 2012 (r243999) @@ -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);