Mercurial > hg > nginx
comparison src/event/ngx_event.h @ 7992:e2d07e4ec636
Events: fixed balancing between workers with EPOLLEXCLUSIVE.
Linux with EPOLLEXCLUSIVE usually notifies only the process which was first
to add the listening socket to the epoll instance. As a result most of the
connections are handled by the first worker process (ticket #2285). To fix
this, we re-add the socket periodically, so other workers will get a chance
to accept connections.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 30 Dec 2021 01:08:46 +0300 |
parents | ec2e6893caaa |
children | 8206ecdcd837 7c2adf237091 |
comparison
equal
deleted
inserted
replaced
7991:57581198e51e | 7992:e2d07e4ec636 |
---|---|
460 extern ngx_uint_t ngx_use_accept_mutex; | 460 extern ngx_uint_t ngx_use_accept_mutex; |
461 extern ngx_uint_t ngx_accept_events; | 461 extern ngx_uint_t ngx_accept_events; |
462 extern ngx_uint_t ngx_accept_mutex_held; | 462 extern ngx_uint_t ngx_accept_mutex_held; |
463 extern ngx_msec_t ngx_accept_mutex_delay; | 463 extern ngx_msec_t ngx_accept_mutex_delay; |
464 extern ngx_int_t ngx_accept_disabled; | 464 extern ngx_int_t ngx_accept_disabled; |
465 extern ngx_uint_t ngx_use_exclusive_accept; | |
465 | 466 |
466 | 467 |
467 #if (NGX_STAT_STUB) | 468 #if (NGX_STAT_STUB) |
468 | 469 |
469 extern ngx_atomic_t *ngx_stat_accepted; | 470 extern ngx_atomic_t *ngx_stat_accepted; |