varnish-cache
varnish-cache copied to clipboard
vefd: Thin wrapper around eventfd with pipe emulation
We recently made change to the HTTP/2 implementation in Varnish Enterprise and would like to share this change. The new HTTP/2 architecture relies on a non-portable eventfd() notification system over a file descriptor, to enable polling of both the client socket and h2_req threads notifications simultaneously from the h2_sess thread.
We settled on this minimal API to capture our limited eventfd() usage and added a fallback to pipe() decided at configure time for systems without eventfd() support.
bugwash consensus: wait for h2 patch which uses this to make a judgement if it can be avoided