|
From: Lucio A. I. A. <l.i...@gm...> - 2016-12-02 21:51:02
|
I've updated unix/configure{,.ac} and unix/tcl{Epoll,Kqueue,Unix}Notfy.c to additionally support
{DragonFly,Net,Open}BSD in addition to FreeBSD and Linux. The kqueue(2) source module compiles and
appears to work on all three new platforms. As the different kqueue(2) implementations are well-
near identical at the interface level, no new code had to be added in the process.
Limited testing has been done, particularly on the BSDs, as I'm currently using QEMU inside a
Hyper-V Linux VM to build and test the code.
The notifier thread (and its infrastructure) has also been removed from tcl{Epoll,Kqueue}Notfy.c.
As spelt out in the updated (unix/)TIP, this means that each thread now owns three new fds: two
for the trigger pipe (inter-thread IPC) and one for the epoll(2)/kqueue(2) fd. Thus, 3000 fds w/
1000 threads, 30k w/ 10k threads, etc. pp.
I do not personally consider this to be a problem as it trades off a moderate amount of a far
less scarce resource to obtain increased scalability and, compared to the original notifier
thread-based implementation, fewer context switches. Lastly, it also removes a decent amount
of code.
|