IPC semaphores in varnishtest

Dridi Boukelmoune dridi at varni.sh
Tue Dec 22 17:13:03 CET 2015


On Tue, Dec 22, 2015 at 3:46 PM, Dag Haavi Finstad
<daghf at varnish-software.com> wrote:
> Hi guys
>
> At the latest dev meeting in Rotterdam it was brought up that it would
> be a useful addition to be able to sync a varnishtest semaphore with
> Varnish itself.
>
> snip
>
> Please take a look - any ideas or feedback will be most welcome.

Hi Dag,

I sent a similar patch set off-list last night and we had offline
discussions on IPC sema in varnishtest. The consensus is to retire
semaphores in their current state and introduce non-cyclic barriers
that would need to be explicitly initialized and would work in either
local (cond) or shared (socket) mode.

The syntax will look like this:

> # initialization
> barrier b1 cond 2
> barrier b2 socket 2
>
> # usage in varnishtest, you don't "sync N" anymore
> barrier b1 sync
>
> # usage in VCL
> debug.barrier_sync("${b2_sock}");

I'll send patches to the list, that's unfortunate that we worked on
the same thing around the same time :(

Cheers,
Dridi



More information about the varnish-dev mailing list