Date: Mon, 20 Sep 2010 18:41:15 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r212912 - stable/7/sys/netinet Message-ID: <201009201841.o8KIfFbN062955@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Mon Sep 20 18:41:15 2010 New Revision: 212912 URL: http://svn.freebsd.org/changeset/base/212912 Log: MFC 211888: Simplify the tcp pcblist estimate logic slightly. 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 Mon Sep 20 18:40:54 2010 (r212911) +++ stable/7/sys/netinet/tcp_subr.c Mon Sep 20 18:41:15 2010 (r212912) @@ -937,11 +937,9 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS) * resource-intensive to repeat twice on every request. */ if (req->oldptr == NULL) { - m = syncache_pcbcount(); - n = tcbinfo.ipi_count; - n += imax((m + n) / 8, 10); - req->oldidx = 2 * (sizeof xig) + - (m + n) * sizeof(struct xtcpcb); + n = tcbinfo.ipi_count + syncache_pcbcount(); + n += imax(n / 8, 10); + req->oldidx = 2 * (sizeof xig) + n * sizeof(struct xtcpcb); return (0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009201841.o8KIfFbN062955>