[OpenSmalltalk/opensmalltalk-vm] 171c23: Added epoll support for aio.c on unix

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[OpenSmalltalk/opensmalltalk-vm] 171c23: Added epoll support for aio.c on unix

Eliot Miranda-3
 
  Branch: refs/heads/Cog
  Home:   https://github.com/OpenSmalltalk/opensmalltalk-vm
  Commit: 171c235451dd16fe6bb29329c3562b2c741f4b1d
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/171c235451dd16fe6bb29329c3562b2c741f4b1d
  Author: Levente Uzonyi <[hidden email]>
  Date:   2020-10-19 (Mon, 19 Oct 2020)

  Changed paths:
    M platforms/unix/vm/aio.c

  Log Message:
  -----------
  Added epoll support for aio.c on unix

When HAVE_CONFIG_H and HAVE_EPOLL is true (the former is pretty much always
true), the select-based aio implementation is replaced with an epoll-based one.
The epoll variant has a few advantages:

- it is free of the lost readSemaphore signals bug (see the comments of
  Socket's various #waitFor* methods which wait on readSemaphore).
- idle CPU usage is down from ~10% to ~2%
- faster Socket operations

Known issue:
- when the VM quits, an error message appears from aioDisable() because
  the file descriptor about to be removed from the epoll set has already
  been closed, therefore it's not in the set. It can be worked around
  by supressing error messages when aioDisable() is called by aioFini()


  Commit: 5fea0e35d24cbda5d31e3b0faaf2c6223c030a26
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/5fea0e35d24cbda5d31e3b0faaf2c6223c030a26
  Author: Eliot Miranda <[hidden email]>
  Date:   2020-10-18 (Sun, 18 Oct 2020)

  Changed paths:
    M platforms/unix/vm/aio.c

  Log Message:
  -----------
  Merge pull request #528 from smalltalking/Cog

Added epoll support for aio.c on unix


Compare: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/da7954d2e48d...5fea0e35d24c