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 <and...@anarazel.de> Discussion: https://postgr.es/m/ca+hukgjjxpdpzbe0a3hyuywbvazuc89yx3jk9rfzgfv_khu...@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/6a2a70a02018d6362f9841cc2f499cc45405e86b Modified Files -------------- src/backend/libpq/pqsignal.c | 4 +- src/backend/storage/ipc/latch.c | 159 ++++++++++++++++++++++++++------------ src/backend/utils/init/miscinit.c | 10 +-- 3 files changed, 118 insertions(+), 55 deletions(-)