|
From: Christian W. <Chr...@t-...> - 2016-12-02 23:27:29
|
On 12/02/2016 10:50 PM, Lucio Andrés Illanes Albornoz wrote:
> 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.
Great progress! I wonder if it's possible to replace the inter-thread IPC pipe on Linux
by a single eventfd(2) thus reducing the 30k to 20k file descriptors.
Best,
Christian
|