Page MenuHomeFreeBSD

Needs ReviewPublic

Authored by trasz on Tue, Jan 14, 12:14 PM.


Group Reviewers
Linux Emulation

Make linux(4) explicitly ignore EPOLLEXCLUSIVE. This is another
fix - or a workaround - for Nginx.

Diff Detail

rS FreeBSD src repository
Lint OK
No Unit Test Coverage
Build Status
Buildable 28731
Build 26746: arc lint + arc unit

Event Timeline

trasz created this revision.Tue, Jan 14, 12:14 PM
emaste added inline comments.Tue, Jan 14, 3:11 PM

I think we should have a message for this case, and a comment with a brief description for the option.

emaste added inline comments.Tue, Jan 14, 3:35 PM

e.g. one of linux_msg, LINUX_SDT_PROBE, LINUX_CTR as appropriate

trasz updated this revision to Diff 66900.Fri, Jan 17, 11:08 AM

Add CTR, just in case.

trasz marked 2 inline comments as done.Fri, Jan 17, 11:08 AM
kib added a comment.Fri, Jan 17, 12:58 PM

What is the semantic of the flag ?


Use braces around the define. There and below.

trasz updated this revision to Diff 66908.Fri, Jan 17, 1:21 PM

Add braces.

trasz marked an inline comment as done.Fri, Jan 17, 1:23 PM

Quoting the man page (

EPOLLEXCLUSIVE (since Linux 4.5)
       Sets an exclusive wakeup mode for the epoll file descriptor that is being attached to the target file descriptor, fd.  When a wakeup event occurs and multiple epoll file descriptors  are
       attached to the same target file using EPOLLEXCLUSIVE, one or more of the epoll file descriptors will receive an event with epoll_wait(2).  The default in this scenario (when EPOLLEXCLU-
       SIVE is not set) is for all epoll file descriptors to receive an event.  EPOLLEXCLUSIVE is thus useful for avoiding thundering herd problems in certain scenarios.
kib added a comment.Fri, Jan 17, 2:03 PM

I think a scary kernel message should be printed when the flag is ignored. Simply because it might affect correctness.

trasz added a comment.Fri, Jan 17, 3:01 PM

I tried that; it's way too verbose. Maybe just a sysctl to disable it?

maybe just emit the warning once?