Date: Wed, 18 Aug 2010 09:28:12 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r211451 - head/sys/netinet Message-ID: <201008180928.o7I9SCl2061310@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bz Date: Wed Aug 18 09:28:12 2010 New Revision: 211451 URL: http://svn.freebsd.org/changeset/base/211451 Log: 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 MFC after: 1 week Modified: head/sys/netinet/tcp_subr.c Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Wed Aug 18 09:18:37 2010 (r211450) +++ head/sys/netinet/tcp_subr.c Wed Aug 18 09:28:12 2010 (r211451) @@ -1022,7 +1022,7 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS) if (req->oldptr == NULL) { m = syncache_pcbcount(); n = V_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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008180928.o7I9SCl2061310>