mirror of https://github.com/mkerrisk/man-pages
epoll.7: Note that edge-triggered notification wakes up only one waiter
Note a useful performance benefit of EPOLLET: ensuring that only one of multiple waiters (in epoll_wait()) is woken up when a file descriptor becomes ready. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
0409116028
commit
a3961b2fd5
17
man7/epoll.7
17
man7/epoll.7
|
@ -200,6 +200,23 @@ it is the caller's responsibility to rearm the file descriptor using
|
|||
.BR epoll_ctl (2)
|
||||
with
|
||||
.BR EPOLL_CTL_MOD .
|
||||
.PP
|
||||
If multiple threads
|
||||
(or processes, if child processes have inherited the
|
||||
.B epoll
|
||||
file descriptor across
|
||||
.BR fork (2))
|
||||
are blocked in
|
||||
.BR epoll_wait (2)
|
||||
waiting on the same the same epoll file descriptor and a file descriptor
|
||||
in the interest list that is marked for edge-triggered
|
||||
.RB ( EPOLLET )
|
||||
notification becomes ready,
|
||||
just one of the threads (or processes) is awoken from
|
||||
.BR epoll_wait (2).
|
||||
This provides a useful optimization for avoiding "thundering herd" wake-ups
|
||||
in some scenarios.
|
||||
.\"
|
||||
.SS Interaction with autosleep
|
||||
If the system is in
|
||||
.B autosleep
|
||||
|
|
Loading…
Reference in New Issue