Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using LIBEV, KQUEUE isn't chosen #87

Closed
rneswold opened this issue Sep 26, 2014 · 3 comments
Closed

When using LIBEV, KQUEUE isn't chosen #87

rneswold opened this issue Sep 26, 2014 · 3 comments

Comments

@rneswold
Copy link
Contributor

I run LWT on a NetBSD system. I recently submitted a patch [/pull/79] allowing the configuration to properly recognize that libev is present on a system using PKGSRC. Now that I'm able to properly install and use it, it appears that KQUEUEs (NetBSD's most efficient handle multiplexer) aren't being used. I also don't see any way for me to insist that LWT use KQUEUEs with libev.

When I installed libev, its config detection found kqueue.h, et al. LWT's config now finds libev. But when I run my program, I see (via top) that it's blocking via select, not kqueue like it should be.

@ghost
Copy link

ghost commented Sep 26, 2014

There is this in the libev documentation:

kqueue is buggy

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.

Also it seems that setting the environment variable LIBEV_FLAGS to 8 should force libev to choose the kqueue backend.

@rneswold
Copy link
Contributor Author

Thanks for finding the environment flag! I didn't see it mentioned when I read the documentation and header files.

(...after testing...)

LIBEV_FLAGS didn't work. The documentation says it will enable and use kqueue for NetBSD, since it's the only platform that has a non-buggy version. But it's still not getting used. I'll investigate the libev end of this, since that seems to be where the problem is.

@yallop
Copy link
Contributor

yallop commented Sep 8, 2016

#269 adds a way to select the kqueue libev backend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants