From: Willy Tarreau Date: Thu, 23 Apr 2015 09:50:43 +0000 (+0200) Subject: MEDIUM: stream-int: pause the appctx if the task is woken up X-Git-Tag: v1.6-dev2~184 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0b1a4541dc199abca5eb3af1ec58c239ad2a3d9b;p=thirdparty%2Fhaproxy.git MEDIUM: stream-int: pause the appctx if the task is woken up If we're going to call the task we don't need to call the appctx anymore since the task may decide differently in the end and will do the proper thing using ->update(). This reduces one wake up call per session and may go down to half in case of high concurrency (scheduling races). --- diff --git a/src/stream_interface.c b/src/stream_interface.c index 08946dfdf8..7e201cd7cc 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -1454,6 +1454,7 @@ void si_applet_done(struct stream_interface *si) (si_opposite(si)->state != SI_ST_EST || (channel_is_empty(oc) && !oc->to_forward)))))) { task_wakeup(si_task(si), TASK_WOKEN_IO); + appctx_pause(si_appctx(si)); } if (ic->flags & CF_READ_ACTIVITY) ic->flags &= ~CF_READ_DONTWAIT;