From owner-svn-src-all@FreeBSD.ORG Fri Aug 27 21:52:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2CB910656B3; Fri, 27 Aug 2010 21:52:54 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E26EA8FC21; Fri, 27 Aug 2010 21:52:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7RLqsGE008771; Fri, 27 Aug 2010 21:52:54 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7RLqsfX008769; Fri, 27 Aug 2010 21:52:54 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201008272152.o7RLqsfX008769@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 27 Aug 2010 21:52:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211903 - stable/7/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 21:52:55 -0000 Author: bz Date: Fri Aug 27 21:52:54 2010 New Revision: 211903 URL: http://svn.freebsd.org/changeset/base/211903 Log: MFC r211451: When calculating the expected memory size for userspace, also take the number of syncache entries into account for the surplus we add to account for a possible increase of records in the re-entry window. Discussed with: jhb, silby Modified: stable/7/sys/netinet/tcp_subr.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/tcp_subr.c ============================================================================== --- stable/7/sys/netinet/tcp_subr.c Fri Aug 27 21:52:27 2010 (r211902) +++ stable/7/sys/netinet/tcp_subr.c Fri Aug 27 21:52:54 2010 (r211903) @@ -939,7 +939,7 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS) if (req->oldptr == NULL) { m = syncache_pcbcount(); n = tcbinfo.ipi_count; - n += imax(n / 8, 10); + n += imax((m + n) / 8, 10); req->oldidx = 2 * (sizeof xig) + (m + n) * sizeof(struct xtcpcb); return (0);