Use signalfd(2) for epoll latches.
authorThomas Munro <tmunro@postgresql.org>
Sun, 28 Feb 2021 23:06:09 +0000 (12:06 +1300)
committerThomas Munro <tmunro@postgresql.org>
Mon, 1 Mar 2021 01:12:02 +0000 (14:12 +1300)
commit6a2a70a02018d6362f9841cc2f499cc45405e86b
tree28a7760914dd066dbd2310cc29e893ac7c6b13a0
parent83709a0d5a46559db016c50ded1a95fd3b0d3be6
Use signalfd(2) for epoll latches.

Cut down on system calls and other overheads by reading from a signalfd
instead of using a signal handler and self-pipe.  Affects Linux sytems,
and possibly others including illumos that implement the Linux epoll and
signalfd interfaces.

Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CA+hUKGJjxPDpzBE0a3hyUywBvaZuC89yx3jK9RFZgfv_KHU7gg@mail.gmail.com
src/backend/libpq/pqsignal.c
src/backend/storage/ipc/latch.c
src/backend/utils/init/miscinit.c