<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
And there it is, conclusive proof that I should not be debugging
Rickard's code before lunch. <br>
<br>
Found the issue, will create a fix for it. As a workaround for R16B
you can use a prime number as the number of async threads :)<br>
<br>
Lukas<br>
<br>
<div class="moz-cite-prefix">On 13/08/13 10:05, Lukas Larsson wrote:<br>
</div>
<blockquote cite="mid:5209E8AD.5000208@erlang.org" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Sigh, apparently I spoke too soon. <br>
<br>
I remembered incorrectly about the change. It was in R16B that
ErlDrvPort became a ptr and it was an id before R16B. Anyways, it
is odd that the ptr is 8 bit aligned on you system. On mine
(Ubuntu 13.04, x86_64) the ptrs are not aligned and the load is
nicely distributed among async threads. If I remember correctly
you are using FreeBSD on x86_64? I'll check if I can reproduce the
behavior you are seeing on our FreeBSD machine. <br>
<br>
Lukas<br>
<br>
<div class="moz-cite-prefix">On 13/08/13 09:40, Lukas Larsson
wrote:<br>
</div>
<blockquote cite="mid:5209E307.6030806@erlang.org" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Hello Rick!<br>
<br>
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. <br>
<br>
Lukas<br>
<br>
<div class="moz-cite-prefix">On 13/08/13 05:40, Rick Reed wrote:<br>
</div>
<blockquote
cite="mid:CA+SuFX3ek+JzUjx+3iHORdUkBTcL63OYTjEJ14PPEEPhmgvRCQ@mail.gmail.com"
type="cite">
<div dir="ltr">It looks to me as though there's a bit of a
problem in the way efile_drv.c generates the
<div>key that's used to select an async driver queue. It
uses the address of the port which</div>
<div>on our system is 8-byte aligned. Meanwhile,
erl_async.c does a simple mod operation</div>
<div>with the number of async threads, so the number of
threads that can actually be used</div>
<div>by file operations is 1/8th of the number configured.
I suspect this isn't intended.</div>
<div><br>
</div>
<div>Rr</div>
<div><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
erlang-bugs mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:erlang-bugs@erlang.org">erlang-bugs@erlang.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-bugs">http://erlang.org/mailman/listinfo/erlang-bugs</a>
</pre>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
erlang-bugs mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:erlang-bugs@erlang.org">erlang-bugs@erlang.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-bugs">http://erlang.org/mailman/listinfo/erlang-bugs</a>
</pre>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
erlang-bugs mailing list
<a class="moz-txt-link-abbreviated" href="mailto:erlang-bugs@erlang.org">erlang-bugs@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-bugs">http://erlang.org/mailman/listinfo/erlang-bugs</a>
</pre>
</blockquote>
<br>
</body>
</html>