]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/netinet/in_tclass.c
xnu-2782.30.5.tar.gz
[apple/xnu.git] / bsd / netinet / in_tclass.c
index d20a07d6eb11ed11a04ba3ca0942ea505d9ff504..e019e43c3b7b554adc9b369c187049a942d2479e 100644 (file)
@@ -842,7 +842,16 @@ set_tcp_stream_priority(struct socket *so)
                 * switch the backgroung streams to use background 
                 * congestion control algorithm. Otherwise, even background
                 * flows can move into foreground.
+                *
+                * System initiated background traffic like cloud uploads
+                * should always use background delay sensitive
+                * algorithms. This will make the stream more resposive to
+                * other streams on the user's network and it will
+                * minimize the latency induced.
                 */
+               if (IS_SO_TC_BACKGROUNDSYSTEM(so->so_traffic_class))
+                       fg_active = true;
+
                if ((sotcdb & SOTCDB_NO_SENDTCPBG) != 0 ||
                        is_local || !fg_active) {
                        if (old_cc == TCP_CC_ALGO_BACKGROUND_INDEX)