svn commit: r211903 - stable/7/sys/netinet
Bjoern A. Zeeb
bz at FreeBSD.org
Fri Aug 27 21:52:55 UTC 2010
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);
More information about the svn-src-stable-7
mailing list