Commit c3ef529
committed
erts: Skip pollset update on scheduler-polled re-arm
An enif_select fd migrated to the scheduler pollset stays registered
for IN events across triggers, but the trigger handler cleared IN
from state->events, so every re-arming enif_select saw a changed
event set and issued an erts_poll_control on the normal pollset: one
epoll_ctl(MOD) per wakeup that changes nothing. Keep IN in
state->events for fds enabled in the scheduler pollset so the
re-arming enif_select becomes a no-op; repeat select messages are
already prevented by the in.pid handshake in the trigger handler.
With a pipelined request/response socket NIF workload (64 callers,
16 connections), epoll_ctl calls drop from one per wakeup (~156k
per 350k requests) to connection setup only (~240), worth ~2%
end-to-end throughput on 8 cores.1 parent 5d651b9 commit c3ef529
1 file changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2148 | 2148 | | |
2149 | 2149 | | |
2150 | 2150 | | |
2151 | | - | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
2152 | 2163 | | |
2153 | 2164 | | |
2154 | 2165 | | |
| |||
0 commit comments