tcp/sack: Optimize scoreboard block allocation
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 13 Apr 2012 07:30:26 +0000 (15:30 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 13 Apr 2012 07:30:26 +0000 (15:30 +0800)
commit01d244e6599942128c17736a308b66ad33222926
tree7dd0639547e636809739e1dcc446d43b7f533b41
parent26d3f1fb665197cd993012ed91ab6aa3ce2dbea3
tcp/sack: Optimize scoreboard block allocation

Allocate SACK scoreboard block only if we can't extend the existing
one's right edge (end).

This commit could avoid ~70% SACK scoreboard block allocation on
leaf.dragonflybsd.org (11528032 updating, 8353353 reused) according
to the "netstat -s -f inet -p tcp" output as of today.  On my testing
sites, this commit could avoid 30%~50% SACK scoreboard block allocation.
sys/netinet/tcp_sack.c