Date: Thu, 27 Feb 2014 22:34:09 +0000 (UTC) From: Hiren Panchasara <hiren@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262578 - stable/10/sys/kern Message-ID: <201402272234.s1RMY9u5016917@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hiren Date: Thu Feb 27 22:34:09 2014 New Revision: 262578 URL: http://svnweb.freebsd.org/changeset/base/262578 Log: MFC r257472 Rate limit (to once per minute) "Listen queue overflow" message in sonewconn(). Modified: stable/10/sys/kern/uipc_socket.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/uipc_socket.c ============================================================================== --- stable/10/sys/kern/uipc_socket.c Thu Feb 27 21:50:46 2014 (r262577) +++ stable/10/sys/kern/uipc_socket.c Thu Feb 27 22:34:09 2014 (r262578) @@ -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?201402272234.s1RMY9u5016917>