From owner-cvs-all@FreeBSD.ORG Wed May 11 21:37:43 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5376816A4CE; Wed, 11 May 2005 21:37:43 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F1D443D4C; Wed, 11 May 2005 21:37:43 +0000 (GMT) (envelope-from ps@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j4BLbhN3011154; Wed, 11 May 2005 21:37:43 GMT (envelope-from ps@repoman.freebsd.org) Received: (from ps@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j4BLbhs9011153; Wed, 11 May 2005 21:37:43 GMT (envelope-from ps) Message-Id: <200505112137.j4BLbhs9011153@repoman.freebsd.org> From: Paul Saab Date: Wed, 11 May 2005 21:37:43 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/netinet tcp_input.c tcp_output.c tcp_sack.c tcp_var.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 May 2005 21:37:43 -0000 ps 2005-05-11 21:37:43 UTC FreeBSD src repository Modified files: sys/netinet tcp_input.c tcp_output.c tcp_sack.c tcp_var.h Log: When looking for the next hole to retransmit from the scoreboard, or to compute the total retransmitted bytes in this sack recovery episode, the scoreboard is traversed. While in sack recovery, this traversal occurs on every call to tcp_output(), every dupack and every partial ack. The scoreboard could potentially get quite large, making this traversal expensive. This change optimizes this by storing hints (for the next hole to retransmit and the total retransmitted bytes in this sack recovery episode) reducing the complexity to find these values from O(n) to constant time. The debug code that sanity checks the hints against the computed value will be removed eventually. Submitted by: Mohan Srinivasan, Noritoshi Demizu, Raja Mukerji. Revision Changes Path 1.272 +5 -4 src/sys/netinet/tcp_input.c 1.111 +7 -2 src/sys/netinet/tcp_output.c 1.16 +111 -71 src/sys/netinet/tcp_sack.c 1.122 +6 -1 src/sys/netinet/tcp_var.h