]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
msg/async/Event: use eventfd on Linux
authorMax Kellermann <max.kellermann@ionos.com>
Mon, 30 Sep 2024 10:39:03 +0000 (12:39 +0200)
committerMax Kellermann <max.kellermann@ionos.com>
Wed, 21 May 2025 06:00:43 +0000 (08:00 +0200)
commitdadc7f40d04f13cb728552bf26a355326c3b2b07
treefd883820a7e40d473330133b2d42d6fcdf4abce4
parentea8cd5a6c72cf46cd361d101bd7ad52594033ed5
msg/async/Event: use eventfd on Linux

eventfd is Linux's first-choice tool for waking up I/O event loops.
It is faster and more robust than pipes - it does not need a list of
pipe buffers, cannot become full, and writing/reading to it is a
simple memory access.

eventfd has been available since Linux 2.6.22, therefore this patch
does not do any configure-time checks and no runtime fallback.  If
we're __linux__, it must be available.

To avoid an ABI breakage, both fields `notify_receive_fd` and
`notify_send_fd` remain, both set to the same eventfd value.

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
src/msg/async/Event.cc