#1701·mio

poll: Optimize locks and allocations in the critical path

Author: jastaCreated Jul 30, 2023Updated Jul 30, 2026
Labelsenhancement

The poll implementation in #1687 makes liberal use of locks and allocations in closed_raw_fds and pending_removal in fairly hot code paths that can be optimized away. There are some dead lock and efficiency concerns as identified here: https://github.com/tokio-rs/mio/pull/1687#discussion_r1275414504 and https://github.com/tokio-rs/mio/pull/1687#discussion_r1274693454 .

These optimizations may prove significant but can be punted until we get the code stable and proven to work well in a variety of environments. Further, it'd be nice to have some new tests that make sure we don't regress by optimizing the code.