Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) .. SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) ====================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) Thin-streams and TCP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) ====================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) A wide range of Internet-based services that use reliable transport
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) protocols display what we call thin-stream properties. This means
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) that the application sends data with such a low rate that the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) retransmission mechanisms of the transport protocol are not fully
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) effective. In time-dependent scenarios (like online games, control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) systems, stock trading etc.) where the user experience depends
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) on the data delivery latency, packet loss can be devastating for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) the service quality. Extreme latencies are caused by TCP's
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) dependency on the arrival of new data from the application to trigger
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) retransmissions effectively through fast retransmit instead of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) waiting for long timeouts.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) After analysing a large number of time-dependent interactive
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) applications, we have seen that they often produce thin streams
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) and also stay with this traffic pattern throughout its entire
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) lifespan. The combination of time-dependency and the fact that the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) streams provoke high latencies when using TCP is unfortunate.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) In order to reduce application-layer latency when packets are lost,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) a set of mechanisms has been made, which address these latency issues
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) for thin streams. In short, if the kernel detects a thin stream,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) the retransmission mechanisms are modified in the following manner:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 1) If the stream is thin, fast retransmit on the first dupACK.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 2) If the stream is thin, do not apply exponential backoff.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) These enhancements are applied only if the stream is detected as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) thin. This is accomplished by defining a threshold for the number
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) of packets in flight. If there are less than 4 packets in flight,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) fast retransmissions can not be triggered, and the stream is prone
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) to experience high retransmission latencies.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) Since these mechanisms are targeted at time-dependent applications,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) they must be specifically activated by the application using the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) TCP_THIN_LINEAR_TIMEOUTS and TCP_THIN_DUPACK IOCTLS or the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) tcp_thin_linear_timeouts and tcp_thin_dupack sysctls. Both
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) modifications are turned off by default.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) References
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) ==========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) More information on the modifications, as well as a wide range of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) experimental data can be found here:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) "Improving latency for interactive, thin-stream applications over
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) reliable transport"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) http://simula.no/research/nd/publications/Simula.nd.477/simula_pdf_file