]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: filters: Don't force the stream's wakeup when we wait in flt_end_analyze
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 30 Mar 2017 09:13:22 +0000 (11:13 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 31 Mar 2017 12:40:45 +0000 (14:40 +0200)
In flt_end_analyze, we wait that the anlayze is finished for both the request
and the response. In this case, because of a task_wakeup, some streams can
consume too much CPU to do nothing. So now, this is the filter's responsibility
to know if this wakeup is needed.

This fix should be backported in 1.7.

src/filters.c

index 24e1d533b23c299c0d25ca0e5202d8d446ba429a..68bf7ee5272c3085161dbbdaad8716960ba00fa2 100644 (file)
@@ -861,12 +861,7 @@ flt_end_analyze(struct stream *s, struct channel *chn, unsigned int an_bit)
                /* Remove backend filters from the list */
                flt_stream_release(s, 1);
        }
-       else {
-               /* This analyzer ends only for one channel. So wake up the
-                * stream to be sure to process it for the other side as soon as
-                * possible. */
-               task_wakeup(s->task, TASK_WOKEN_MSG);
-       }
+
        return ret;
 }