]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: stconn: Don't requeue the stream's task after I/O
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 14 Feb 2023 14:49:15 +0000 (15:49 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 22 Feb 2023 13:52:15 +0000 (14:52 +0100)
After I/O handling, in sc_notify(), the stream's task is no longer
requeue. The stream may be woken up. But its task is not requeue. It is
useless nowadays and only avoids a call to process_stream() for edge
cases. It is not really a big deal if the stream is woken up for nothing
because its task expired. At worst, it will be responsible to compute its
new expiration date.

src/stconn.c

index fd8c0f629fb9e3b33e41658f4541b103de4fc98a..f834f70e1d550d1d2b451d0301cb2296acff2b0b 100644 (file)
@@ -1218,18 +1218,7 @@ static void sc_notify(struct stconn *sc)
               (channel_is_empty(oc) && !oc->to_forward)))))) {
                task_wakeup(task, TASK_WOKEN_IO);
        }
-       else {
-               /* Update expiration date for the task and requeue it */
-               task->expire = tick_first((tick_is_expired(task->expire, now_ms) ? 0 : task->expire),
-                                         tick_first(tick_first(sc_ep_rex(sc), sc_ep_wex(sc)),
-                                                    tick_first(sc_ep_rex(sco), sc_ep_wex(sco))));
-
-               task->expire = tick_first(task->expire, ic->analyse_exp);
-               task->expire = tick_first(task->expire, oc->analyse_exp);
-               task->expire = tick_first(task->expire, __sc_strm(sc)->conn_exp);
 
-               task_queue(task);
-       }
        if (ic->flags & CF_READ_EVENT)
                ic->flags &= ~CF_READ_DONTWAIT;
 }