#
44a4bc5f |
| 23-May-2020 |
Kyle Ambroff-Kao <kyle@ambroffkao.com> |
tcp: Remove sanity checks from BufferQueue in release builds
Each TCPEndpoint has two BufferQueue members, one for the send queue and one for the receive queue.
If DEBUG_BUFFER_QUEUE is enabled, th
tcp: Remove sanity checks from BufferQueue in release builds
Each TCPEndpoint has two BufferQueue members, one for the send queue and one for the receive queue.
If DEBUG_BUFFER_QUEUE is enabled, then most methods of BufferQueue call BufferQueue::Verify(), sometimes twice. This member function performs some sanity checking which requires iterating through every net_buffer in the queue.
Disabling this in a debug build improved throughput by a factor of 5x over the loopback interface on my laptop. Using iperf the measured throughput went from 900Mbps to around 4.8Gbps.
This patch turns this sanity checking off for release builds.
* Rename DEBUG_BUFFER_QUEUE to DEBUG_TCP_BUFFER_QUEUE * Change the default in BufferQueue.h to disabled * Set DEBUG_TCP_BUFFER_QUEUE to KDEBUG_LEVEL_2 in kernel_debug_config.h
Change-Id: I262dac5d7e2889d2942bbdcf6b667cc0cbafa4c8 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2780 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
show more ...
|