On 10/03/15 22:02, Poul-Henning Kamp wrote: > So how does locking of a PRIV_TOPREQ work if we implement parallel-ESI ? > > We might have two different child-fetches running in parallel, asking for > a PRIV_TOPREQ at the exact same instant from the same VMOD ?
I tend towards 'point out to the requirement once we get parallel ESI (if ever) and leave it up to the vmod' - the reason being that vmods for parallel ESI may even need to do much more sophisticated synchronization than just general locking of a shared datastructure - or none at all. Regarding the PRIV_TOPREQ itself, I fail to see any locking requirement _now_, but if I am wrong of if you think we should have it even before anything like parallel ESI, please say so. In this case it appears to me that protecting the privs member of struct vrt_privs with a mutex should be adequate. But I'd be surprised if this was the only synchronization requirement if we add parallel ESI... Thanks, Nils _______________________________________________ varnish-dev mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
