tcp/sack: Further optimize scoreboard block allocation
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 13 Apr 2012 08:34:51 +0000 (16:34 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 13 Apr 2012 08:34:51 +0000 (16:34 +0800)
commit006af0db0565624558c5eb83879018f6f2569bf1
treed0babe6ca05a37ffe3b0f39dfb29bd4bba7514dc
parent01d244e6599942128c17736a308b66ad33222926
tcp/sack: Further optimize scoreboard block allocation

Use one slot freed SACK scoreboard cache.

30minutes tests are conducted on a heavy congested real-life network path;
the new statistics:

  31254 SACK scoreboard updates
      2 overflows
      0 failures
      13392 records reused
      12703 records fast allocated

Before this commit, ~42% allocations are avoided (reused); after this commit,
~83% allocations are avoided (reused + fast allocated).
sys/netinet/tcp_sack.c
sys/netinet/tcp_subr.c
sys/netinet/tcp_var.h
usr.bin/netstat/inet.c