erlang uses the kpoll flag but contains a typo. This is the case at least with 12.2.0 and 12.2.1. Reproducible: Always Steps to Reproduce: Apparently fixing this typo does not cause erl to recognize kpoll: #erl Erlang (BEAM) emulator version 5.6.1 [source] [smp:1] [async-threads:0] [hipe] [kernel-poll:false] ..even though configure recognized the option, but still selected "epoll". Might just be a problem with the erl output though. The typo needs to be fixed in any case.
Created attachment 142912 [details, diff] fix for USE="kpoll" typo to pass the correct option to configure
This typo was there since this... 24 Feb 2007; Christian Faulhammer <opfer@gentoo.org> +erlang-11.2.3-r1.ebuild: added smp and kpoll USE flags to enable/disable those features, adjusted some bits; thanks to Max Loparyev <max@city.veganet.ru> nearly one year and nobody noticed. Fixed.
Great, thanks. FWIW I figured out the kpoll mystery - you have to start erl with "+K true" to explicitly make it use kpoll: holger>erl +K true Erlang (BEAM) emulator version 5.6.1 [source] [smp:1] [async-threads:0] [hipe] [kernel-poll:true] so the flag works and all is good. :)
(In reply to comment #3) > Great, thanks. FWIW I figured out the kpoll mystery - you have to start erl > with "+K true" to explicitly make it use kpoll: How can this be activated by default? Because someone requesting USE=kpoll wants it to work out of the box.
Good question. The easiest/non-intrusive way seems to be to define a default environment variable as documented in man erl. There are two, ERL_FLAGS (appended to the end of the commandline) and ERL_AFLAGS (prepended to the beginning) so it seems ERL_AFLAGS is a good candidate for setting defaults. Overriding works too: holger>unset ERL_FLAGS holger>unset ERL_AFLAGS holger>erl Erlang (BEAM) emulator version 5.6.1 [source] [smp:1] [async-threads:0] [hipe] [kernel-poll:false] holger>export ERL_AFLAGS="+K true" holger>erl Erlang (BEAM) emulator version 5.6.1 [source] [smp:1] [async-threads:0] [hipe] [kernel-poll:true] holger>erl +K false Erlang (BEAM) emulator version 5.6.1 [source] [smp:1] [async-threads:0] [hipe] [kernel-poll:false] Looks like a reasonable approach instead of patching around in the source, right? The argument handling can be found in erts/etc/common/erlexec.c:main but that seems to be the wrong place to force +K. A quick read through the various erl_poll.(c,h) files didn't show any simple switches either.