comparison auto/os/linux @ 6635:6acaa638fa07

Events: support for EPOLLEXCLUSIVE. This flag appeared in Linux 4.5 and is useful for avoiding thundering herd problem. The current Linux kernel implementation walks the list of exclusive waiters, and queues an event to each epfd, until it finds the first waiter that has threads blocked on it via epoll_wait().
author Valentin Bartenev <vbart@nginx.com>
date Fri, 15 Jul 2016 15:18:57 +0300
parents e393c0bf53d3
children c1524829af3d
comparison
equal deleted inserted replaced
6634:18f6120e3b7a 6635:6acaa638fa07
65 ngx_feature_path= 65 ngx_feature_path=
66 ngx_feature_libs= 66 ngx_feature_libs=
67 ngx_feature_test="int efd = 0, fd = 0; 67 ngx_feature_test="int efd = 0, fd = 0;
68 struct epoll_event ee; 68 struct epoll_event ee;
69 ee.events = EPOLLIN|EPOLLRDHUP|EPOLLET; 69 ee.events = EPOLLIN|EPOLLRDHUP|EPOLLET;
70 ee.data.ptr = NULL;
71 epoll_ctl(efd, EPOLL_CTL_ADD, fd, &ee)"
72 . auto/feature
73
74
75 # EPOLLEXCLUSIVE appeared in Linux 4.5, glibc 2.24
76
77 ngx_feature="EPOLLEXCLUSIVE"
78 ngx_feature_name="NGX_HAVE_EPOLLEXCLUSIVE"
79 ngx_feature_run=no
80 ngx_feature_incs="#include <sys/epoll.h>"
81 ngx_feature_path=
82 ngx_feature_libs=
83 ngx_feature_test="int efd = 0, fd = 0;
84 struct epoll_event ee;
85 ee.events = EPOLLIN|EPOLLEXCLUSIVE;
70 ee.data.ptr = NULL; 86 ee.data.ptr = NULL;
71 epoll_ctl(efd, EPOLL_CTL_ADD, fd, &ee)" 87 epoll_ctl(efd, EPOLL_CTL_ADD, fd, &ee)"
72 . auto/feature 88 . auto/feature
73 fi 89 fi
74 90