From: phk Date: Mon, 8 Oct 2007 19:15:41 +0000 (+0000) Subject: Try to optimize the poll acceptor by moving active entries to the X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=557f24ff7194f1e8a1fb8471200d42cdf3b7ed7c;p=varnish Try to optimize the poll acceptor by moving active entries to the front of the linked list where they will be found faster later on. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2095 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_acceptor_poll.c b/varnish-cache/bin/varnishd/cache_acceptor_poll.c index 8a2587c8..7cb29803 100644 --- a/varnish-cache/bin/varnishd/cache_acceptor_poll.c +++ b/varnish-cache/bin/varnishd/cache_acceptor_poll.c @@ -28,9 +28,6 @@ * * $Id$ * - * XXX: We need to pass sessions back into the event engine when they are - * reused. Not sure what the most efficient way is for that. For now - * write the session pointer to a pipe which the event engine monitors. */ #if defined(HAVE_POLL) @@ -132,9 +129,11 @@ vca_main(void *arg) if (pollfd[fd].revents) { v--; i = HTC_Rx(sp->htc); - if (i == 0) - continue; VTAILQ_REMOVE(&sesshead, sp, list); + if (i == 0) { + VTAILQ_INSERT_HEAD(&sesshead, sp, list); + continue; + } vca_unpoll(fd); vca_handover(sp, i); continue;