<div dir="ltr">Hello,<br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 23, 2017 at 2:35 PM, Salikhov Dinislam <span dir="ltr"><<a href="mailto:Dinislam.Salikhov@kaspersky.com" target="_blank">Dinislam.Salikhov@kaspersky.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Is there any rationale for write operation being done this way?<br>
I'd like to propose an optimization here: if we know in advance that standard drv_get_response/1 will be used to get driver's response, then we can use synchronous erlang:port_control/3 instead to avoid the whole message queue traverse.</blockquote><div><br></div><div>Using erlang:port_control/3 will not help as the file I/O job is scheduled on the async thread poll which means that it has to ack by sending a message. </div><div><br></div><div>We are in the process of re-writing the efile driver for OTP 21 using a nif, this re-write will solve this problem as no message passing is needed when ack:ing writes done on dirty schedulers.</div></div></div></div>