Commit 6e9a2543 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

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: http://www.varnish-cache.org/svn/trunk/varnish-cache@2095 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 56cec2f0
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment