runtime: use eventfd
as the event wait/notify mechanism for epoll
#65443
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsFix
The path to resolution is known, but the work has not been done.
OS-Linux
Performance
Milestone
Currently, we use
pipe
to interrupt theepoll_wait
, which requires two file descriptors. Furthermore, given its complexity inside,pipe
is a bit heavyweight for just a simple event wait/notify mechanism.eventfd
would be a more suitable solution for the currentnetpoll
withepoll
in Go, kernel also advocates for developers to useeventfd
instead ofpipe
in some simple scenarios:eventfd
had been available since Linux 2.6.22 andeventfd2
had been available since Linux 2.6.27, the minimal kernel version required by Go is 2.6.32, so we're good to go.CC @golang/runtime
The text was updated successfully, but these errors were encountered: