Date: Thu, 23 Jun 2016 11:55:15 +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: r302140 - head/sys/netinet Message-ID: <201606231155.u5NBtFor031974@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bz Date: Thu Jun 23 11:55:15 2016 New Revision: 302140 URL: https://svnweb.freebsd.org/changeset/base/302140 Log: In VNET TCP teardown Do not sleep unconditionally but only if we have any TCP connections left. Submitted by: zec Approved by: re (hrs) MFC after: 13 days Modified: head/sys/netinet/tcp_subr.c Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Thu Jun 23 09:23:37 2016 (r302139) +++ head/sys/netinet/tcp_subr.c Thu Jun 23 11:55:15 2016 (r302140) @@ -739,10 +739,11 @@ tcp_destroy(void *unused __unused) * Sleep to let all tcpcb timers really disappear and cleanup. */ do { - pause("tcpdes", hz/10); INP_LIST_RLOCK(&V_tcbinfo); n = V_tcbinfo.ipi_count; INP_LIST_RUNLOCK(&V_tcbinfo); + if (n != 0) + pause("tcpdes", hz / 10); } while (n != 0); tcp_hc_destroy(); syncache_destroy();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606231155.u5NBtFor031974>