Commit 6b57651
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, so a re-arming enif_select has nothing
to change in either pollset. The scheduler pollset control was
already short-circuited for this case, but the call still fell
through to an erts_poll_control on the normal pollset: one
epoll_ctl(MOD) per wakeup that changes nothing. Skip the pollset
update entirely when re-arming a read select on an fd that is
enabled in the scheduler pollset. The trigger handler still clears
IN from state->events, so fds that stop being re-armed migrate back
to a poll thread as before.
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 6b57651
1 file changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1409 | 1409 | | |
1410 | 1410 | | |
1411 | 1411 | | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
1412 | 1423 | | |
1413 | 1424 | | |
1414 | 1425 | | |
| |||
0 commit comments