svn commit: r212911 - stable/8/sys/netinet
John Baldwin
jhb at FreeBSD.org
Mon Sep 20 18:40:55 UTC 2010
Author: jhb
Date: Mon Sep 20 18:40:54 2010
New Revision: 212911
URL: http://svn.freebsd.org/changeset/base/212911
Log:
MFC 211888: Simplify the tcp pcblist estimate logic slightly.
Modified:
stable/8/sys/netinet/tcp_subr.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
stable/8/sys/dev/xen/xenpci/ (props changed)
Modified: stable/8/sys/netinet/tcp_subr.c
==============================================================================
--- stable/8/sys/netinet/tcp_subr.c Mon Sep 20 18:26:37 2010 (r212910)
+++ stable/8/sys/netinet/tcp_subr.c Mon Sep 20 18:40:54 2010 (r212911)
@@ -1016,11 +1016,9 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS)
* resource-intensive to repeat twice on every request.
*/
if (req->oldptr == NULL) {
- m = syncache_pcbcount();
- n = V_tcbinfo.ipi_count;
- n += imax((m + n) / 8, 10);
- req->oldidx = 2 * (sizeof xig) +
- (m + n) * sizeof(struct xtcpcb);
+ n = V_tcbinfo.ipi_count + syncache_pcbcount();
+ n += imax(n / 8, 10);
+ req->oldidx = 2 * (sizeof xig) + n * sizeof(struct xtcpcb);
return (0);
}
More information about the svn-src-all
mailing list