chriskohlhoff / asio

Asio C++ Library
http://think-async.com/Asio
4.99k stars 1.23k forks source link

ionotify() implementation for QNX based on QNX pulse communcation #1387

Open VladCimpianu opened 1 year ago

VladCimpianu commented 1 year ago

The current ASIO socket implementation on QNX uses two different processes for communication. The io_pkt (or in newer version io_sock) and the pipe daemon. Involving additional daemons in basic communication paths is always less than optional with respect to latency and CPU load. While io_pkt implements the real socket functionality, the pipe daemon is only used to implement the file descriptor select functionality. ASIOs default select_reactor implementation on QNX uses the pipe_select_interrupter, which performs the interactions with the pipe daemon. The proposed patch (initially implemented by Blackberry) implements its own ionotify_reactor, which builds on top of the ionotify() system call and asynchronous QNX pulse communication. As a result, the interaction with the additional pipe daemon is not needed anymore.

VladCimpianu commented 9 months ago

Hello @chriskohlhoff @klemens-morgenstern @vinipsmaker @MarcelRaad

Sorry to notify you like this but I cant find any way to contact you. Is it possible to review this PR?

Thank you!

MarcelRaad commented 9 months ago

I'm not a maintainer, sorry.

VladCimpianu commented 9 months ago

I'm not a maintainer, sorry.

Do you have any contact from any maintainer?

olegv11 commented 7 months ago

At NVIDIA we've encountered problems with QNX's select_reactor due to the limit on the max value of file descriptors that select accepts. I've written a custom reactor based on poll() (which I can submit a patch for if there's interest). But ionotify(), a native mechanism for QNX, sounds like a much better solution. It'd be great to see this patch merged.

@VladCimpianu About the patch itself. It seems like config.hpp.orig was accidentally added to the commit. There's also an __SRCVERSION macro that isn't used anywhere else in the project.