Currently, the TCP slow timer can starve TCP input processing while it
authorjhb <jhb@FreeBSD.org>
Thu, 10 Apr 2014 18:15:35 +0000 (18:15 +0000)
committerjhb <jhb@FreeBSD.org>
Thu, 10 Apr 2014 18:15:35 +0000 (18:15 +0000)
commit7d16e10f8906f2f35e5aa2d79c8c567979091666
treec70bc3440a40fdcfa85bfb76b69c740b1a115702
parentb8313a5a982bf64db3f5b731376d067a7b3578e7
Currently, the TCP slow timer can starve TCP input processing while it
walks the list of connections in TIME_WAIT closing expired connections
due to contention on the global TCP pcbinfo lock.

To remediate, introduce a new global lock to protect the list of
connections in TIME_WAIT.  Only acquire the TCP pcbinfo lock when
closing an expired connection.  This limits the window of time when
TCP input processing is stopped to the amount of time needed to close
a single connection.

Submitted by: Julien Charbon <jcharbon@verisign.com>
Reviewed by: rwatson, rrs, adrian
MFC after: 2 months
sys/netinet/tcp_timer.c
sys/netinet/tcp_timer.h
sys/netinet/tcp_timewait.c
sys/netinet/tcp_var.h