[OpenSmalltalk/opensmalltalk-vm] Added epoll support for aio.c on unix (#528)

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

[OpenSmalltalk/opensmalltalk-vm] Added epoll support for aio.c on unix (#528)

David T Lewis
 

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()

You can view, comment on, or merge this pull request online at:

  https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/528

Commit Summary

  • Added epoll support for aio.c on unix

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/528", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/528", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Added epoll support for aio.c on unix (#528)

David T Lewis
 

Wow Levente, thank you!!!!

_,,,^..^,,,_ (phone)

> On Oct 18, 2020, at 4:59 PM, smalltalking <[hidden email]> wrote:
>
> 
> 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()
> You can view, comment on, or merge this pull request online at:
>
> https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/528
>
> Commit Summary
>
> Added epoll support for aio.c on unix
> File Changes
>
> M platforms/unix/vm/aio.c (356)
> Patch Links:
>
> https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/528.patch
> https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/528.diff
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub, or unsubscribe.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/528#issuecomment-711458845", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/528#issuecomment-711458845", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Added epoll support for aio.c on unix (#528)

David T Lewis
In reply to this post by David T Lewis
 

@eliotmiranda approved this pull request.

This is fabulous and long desired. While the builds are failing they're doing so because of an hack for image file access in sq.h that has to go. So I'm going to approve and move the file access macro crap to a set of platform-specific files included by the interpreter. i.e. we're going to break things until we fix them.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/528#pullrequestreview-511367695", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/528#pullrequestreview-511367695", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Added epoll support for aio.c on unix (#528)

David T Lewis
In reply to this post by David T Lewis
 

Merged #528 into Cog.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/528#event-3890983009", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/528#event-3890983009", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>