Date: Thu, 31 Oct 2013 20:33:21 +0000 (UTC) From: Maksim Yevmenkin <emax@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257472 - head/sys/kern Message-ID: <201310312033.r9VKXLdV048955@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emax Date: Thu Oct 31 20:33:21 2013 New Revision: 257472 URL: http://svnweb.freebsd.org/changeset/base/257472 Log: Rate limit (to once per minute) "Listen queue overflow" message in sonewconn(). Reviewed by: scottl, lstewart Obtained from: Netflix, Inc MFC after: 2 weeks Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Thu Oct 31 20:32:11 2013 (r257471) +++ head/sys/kern/uipc_socket.c Thu Oct 31 20:33:21 2013 (r257472) @@ -486,6 +486,10 @@ SYSCTL_INT(_regression, OID_AUTO, sonewc struct socket * sonewconn(struct socket *head, int connstatus) { + static struct timeval lastover; + static struct timeval overinterval = { 60, 0 }; + static int overcount; + struct socket *so; int over; @@ -497,9 +501,17 @@ sonewconn(struct socket *head, int conns #else if (over) { #endif - log(LOG_DEBUG, "%s: pcb %p: Listen queue overflow: " - "%i already in queue awaiting acceptance\n", - __func__, head->so_pcb, head->so_qlen); + overcount++; + + if (ratecheck(&lastover, &overinterval)) { + log(LOG_DEBUG, "%s: pcb %p: Listen queue overflow: " + "%i already in queue awaiting acceptance " + "(%d occurrences)\n", + __func__, head->so_pcb, head->so_qlen, overcount); + + overcount = 0; + } + return (NULL); } VNET_ASSERT(head->so_vnet != NULL, ("%s:%d so_vnet is NULL, head=%p",
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310312033.r9VKXLdV048955>