[erlang-bugs] efile_drv & async thread key

Lukas Larsson <>
Tue Aug 13 09:40:55 CEST 2013

Hello Rick!

Which version of Erlang are you using? From R16B (I think), the 
ErlDrvPort datatype no longer is a pointer to the port struct. Instead 
it is the slot id into the port table and those ids should contain all 
values. I did a quick test on my computer running the latest on maint on 
github and seem to get a full spread over all async threads.


On 13/08/13 05:40, Rick Reed wrote:
> It looks to me as though there's a bit of a problem in the way 
> efile_drv.c generates the
> key that's used to select an async driver queue.  It uses the address 
> of the port which
> on our system is 8-byte aligned.  Meanwhile, erl_async.c does a simple 
> mod operation
> with the number of async threads, so the number of threads that can 
> actually be used
> by file operations is 1/8th of the number configured.  I suspect this 
> isn't intended.
> Rr
> _______________________________________________
> erlang-bugs mailing list
> http://erlang.org/mailman/listinfo/erlang-bugs

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20130813/48dbad8a/attachment.html>

More information about the erlang-bugs mailing list