Enable epoll1 poller

reviewable/pr11816/r1
Craig Tiller 8 years ago
parent 1cb396dc18
commit bb742675a8
  1. 5
      src/core/lib/iomgr/ev_epoll1_linux.c
  2. 2
      src/core/lib/iomgr/ev_epollsig_linux.c
  3. 4
      tools/run_tests/run_tests.py

@ -668,9 +668,9 @@ static void end_worker(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
} }
} else { } else {
gpr_atm_no_barrier_store(&g_active_poller, 0); gpr_atm_no_barrier_store(&g_active_poller, 0);
gpr_mu_unlock(&pollset->mu);
size_t poller_neighbourhood_idx = size_t poller_neighbourhood_idx =
(size_t)(pollset->neighbourhood - g_neighbourhoods); (size_t)(pollset->neighbourhood - g_neighbourhoods);
gpr_mu_unlock(&pollset->mu);
bool found_worker = false; bool found_worker = false;
bool scan_state[MAX_NEIGHBOURHOODS]; bool scan_state[MAX_NEIGHBOURHOODS];
for (size_t i = 0; !found_worker && i < g_num_neighbourhoods; i++) { for (size_t i = 0; !found_worker && i < g_num_neighbourhoods; i++) {
@ -948,9 +948,6 @@ static const grpc_event_engine_vtable vtable = {
/* It is possible that GLIBC has epoll but the underlying kernel doesn't. /* It is possible that GLIBC has epoll but the underlying kernel doesn't.
* Create a dummy epoll_fd to make sure epoll support is available */ * Create a dummy epoll_fd to make sure epoll support is available */
const grpc_event_engine_vtable *grpc_init_epoll1_linux(bool explicit_request) { const grpc_event_engine_vtable *grpc_init_epoll1_linux(bool explicit_request) {
/* TODO(ctiller): temporary, until this stabilizes */
if (!explicit_request) return NULL;
if (!grpc_has_wakeup_fd()) { if (!grpc_has_wakeup_fd()) {
return NULL; return NULL;
} }

@ -1937,7 +1937,7 @@ const grpc_event_engine_vtable *grpc_init_epollsig_linux(
if (!is_grpc_wakeup_signal_initialized) { if (!is_grpc_wakeup_signal_initialized) {
/* TODO(ctiller): when other epoll engines are ready, remove the true || to /* TODO(ctiller): when other epoll engines are ready, remove the true || to
* force this to be explitly chosen if needed */ * force this to be explitly chosen if needed */
if (true || explicit_request) { if (explicit_request) {
grpc_use_signal(SIGRTMIN + 6); grpc_use_signal(SIGRTMIN + 6);
} else { } else {
return NULL; return NULL;

@ -75,8 +75,8 @@ _FORCE_ENVIRON_FOR_WRAPPERS = {
_POLLING_STRATEGIES = { _POLLING_STRATEGIES = {
'linux': ['epollsig', 'poll', 'poll-cv'], 'linux': ['epoll1', 'epollsig', 'poll', 'poll-cv'],
# TODO(ctiller, sreecha): enable epoll1, epollex, epoll-thread-pool # TODO(ctiller, sreecha): enable epollex, epoll-thread-pool
'mac': ['poll'], 'mac': ['poll'],
} }

Loading…
Cancel
Save