Godfrey van der Linden | 10 Jun 00:30 2012
Picon

Buggy Darwin?

G'day, All.

Just tripped over your library today and I like what your doing; I was stunned by how slow libevent was, 6
times less throughput than my simple hand rolled pthread condition based loop, wtf. For multi thread queueing.

Anyway I noticed this section in your docs.

> The kqueue syscall is broken in all known versions - most versions support only sockets, many support pipes.
> 
> Libev tries to work around this by not using kqueue by default on this rotten platform, but of course you can
still ask for it when creating a loop - embedding a socket-only kqueue loop into a select-based one is
probably going to work well.

Two things, I used to be a kernel developer at Apple and don't like to see my kernel do this sort of thing badly.
Have you raised bugs?

Secondly, I'm working on some open source code and I'd like to integrate kqueues into its implementation on
the mac, I'd like to track directory modifications. Do you remember what the problems were that you were
having? I haven't found any problems with EVFILT_VNODE yet and I know EVFILT_MACH is OK and you say the
sockets are OK, how about the signals?

Cheers

Godfrey van der Linden
Marc Lehmann | 10 Jun 11:05 2012
Picon

Re: Buggy Darwin?

On Sat, Jun 09, 2012 at 03:30:17PM -0700, Godfrey van der Linden <gvdl <at> mac.com> wrote:
> Just tripped over your library today and I like what your doing; I was stunned by how slow libevent was, 6
times less throughput than my simple hand rolled pthread condition based loop, wtf. For multi thread queueing.

I doubt libev will be a lot faster, certainly now on os x.

> > Libev tries to work around this by not using kqueue by default on this rotten platform, but of course you
can still ask for it when creating a loop - embedding a socket-only kqueue loop into a select-based one is
probably going to work well.
> 
> Two things, I used to be a kernel developer at Apple and don't like to see my kernel do this sort of thing
badly. Have you raised bugs?

Many people have raised bugs with apple. I am surprised you don't know that
apple handles bugs by makign them private and, in the next version, break it
even more?

The kqueue problems are known to apple for many years, all that has happened
is that they additionally broke poll in some recent os x release (by making
it use kqueue).

Given that select is also broken because it doesn't work with n > 1023 by
default, I doubt apple gives a shit :)

> Secondly, I'm working on some open source code and I'd like to integrate
> kqueues into its implementation on the mac,

Just to make it clear - apple fights and actively tries to hurt free
software. I am not intersted in supporting apple in any way in this, so a
long time ago I decided not to invest more time into apple than necessary.
(Continue reading)

Zsbán Ambrus | 10 Jun 12:41 2012
Picon

Re: Buggy Darwin?

On 6/10/12, Marc Lehmann <schmorp <at> schmorp.de> wrote:
> On Sat, Jun 09, 2012 at 03:30:17PM -0700, Godfrey van der Linden
> <gvdl <at> mac.com> wrote:
> The kqueue problems are known to apple for many years, all that has
> happened
> is that they additionally broke poll in some recent os x release (by making
> it use kqueue).

In that case, could you also tell us about those kqueue bugs?  Besides
kqueue working only on sockets and not providing a way for inode
notifications, what are the other problems on OS X?  I have tried to
look at the ev documentation but it also doesn't seem to tell any more
details.

Ambrus
Marc Lehmann | 10 Jun 13:00 2012
Picon

Re: Buggy Darwin?

On Sun, Jun 10, 2012 at 12:41:44PM +0200, Zsbán Ambrus <ambrus <at> math.bme.hu> wrote:
> In that case, could you also tell us about those kqueue bugs?  Besides
> kqueue working only on sockets and not providing a way for inode
> notifications,

it probably does provide inode notifications, and even if not, that
wouldn't be a bug. at least I have no indication that file event
notifications don't work as documented.

> I have tried to look at the ev documentation but it also doesn't seem to
> tell any more details.

kqueue is not the only minefield on os x - for example, they replaced gcc
by an antique and totally broken clang version, after being pressured to
release gcc sources as they would have to do by the license. this affected
and affects libev, EV and other projects a lot. The libc is beyond broken
w.r.t. to multibyte functions, even in security-relevant ways (overflows when
parsing partial multibyte characters) etc. etc.

poll has also been mentioned, which has been broken in 10.6 or 10.7 or so.

If you are interested in this topic, use google, not this list. apple did
enough damage already, the problems are widely documented, and any minute
I waste more on this causes mroe damage.

--

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
(Continue reading)


Gmane