[libdispatch-dev] linux port

Mark Heily mark at heily.com
Fri Sep 25 13:40:09 PDT 2009

David Leimbach wrote:
> Anyone happen to know the history behind why linux chose to implement
> epoll when many other Unix's were already doing kqueues?
> I'm sure someone had a reason somewhere, and I hope it's not just NIH
> syndrome.

Sometimes I think Linux exists because it is fun to reinvent Unix.
Unfortunately, they usually do it badly :)

Linus thinks kqueue is "silly" and too complicated:


One Linux developer attempted (and failed) to get kevents added to the kernel.
Apparently he is working on eventfs now:


I think it would be possible to use a combination of Linux kernel facilities
to emulate most of kqueue's functionality. Here's a rough mapping:

	epoll		Sockets
	inotify		Files and directories
	signalfd	Signals
	timerfd		Timers

It looks like timerfd was released in one Linux kernel rev, and then withdrawn
for futher rework of the API. I don't know if it will be reintroduced later.


 - Mark

More information about the libdispatch-dev mailing list