]> err.no Git - varnish/commit
Reduce traffic on the wrk_mtx, saving some syscalls along the way:
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 6 Sep 2006 19:35:33 +0000 (19:35 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 6 Sep 2006 19:35:33 +0000 (19:35 +0000)
commit24d44957d1e55005125550d37dc5dbb18cdec4e8
treebb764e8b96d5a29d5df26df8cc172a9a424a5ccf
parentdca7917e3337bf4cb01695fc2726beb753dea984
Reduce traffic on the wrk_mtx, saving some syscalls along the way:

Make a thread-reaper-thread which examines the tail end of the queue
and kicks threads which are too old so the wake up and die.

This allows us to assume that a thread on the free queue is always
waiting on its condvar, so we don't need to hold the mutex when we
signal the condvar.

As a result, the woken thread stands a chance to grab the mutex
and a little song and dance between the two threads is avoided.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@929 d4fa192b-c00b-0410-8231-f00ffab90ce4
varnish-cache/bin/varnishd/cache.h
varnish-cache/bin/varnishd/cache_pool.c