Skip to content

Conversation

@dridi
Copy link
Member

@dridi dridi commented Jun 13, 2025

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.

dridi added 3 commits June 13, 2025 15:32
This is a minimal API not attempting to keep track of the eventfd
counter, and only caring about threads signalling progress on one
end, and another thread being able to notice that progress can be
made.

This is an alternative to condvars when waiting for progress will
content with polling concurrently waiting for progress elsewhere.

Since locks/condvars don't compose well with file descriptors, the
VEFD API offers an alternative that can integrate an existing poll
on other file descriptors.
@nigoroll
Copy link
Member

bugwash consensus: wait for h2 patch which uses this to make a judgement if it can be avoided

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants