Skip to content

Draft: Remove the classic select() I/O manager

This is a draft MR to see what removing the classic select() I/O manager would look like. I don't propose that we remove it immediately. The order of changes should probably be:

  1. merge the new I/O managers
  2. make epoll and poll() the preferred I/O manager for the non-threaded RTS
  3. remove the select() I/O manager

Depending on how conservative people feel, one could have a GHC release between step 2 and/or step 3.

This MR builds on !9677 and !11588. Only the last few patches are relevant to this MR.

The classic select() I/O manager has a number of disadvantages compared to the new style I/O managers:

  • O(n) timer performance vs O(log n) for the new one
  • max of 1024 fds
  • custom StgBlockInfo used just for select() I/O manager
  • timer resolution limited to 32bit

Other removal highlights:

  • Remove now-unused 'fd' and 'target' members from StgBlockInfo union
  • Remove hack for __darwin_fd_set_overflow since we no longer use FD_SET

Fixes #22588.

Edited by Duncan Coutts

Merge request reports