[erlang-questions] Synchronous communication with prim_file port

Lukas Larsson lukas@REDACTED
Tue Oct 24 09:39:40 CEST 2017


On Mon, Oct 23, 2017 at 2:35 PM, Salikhov Dinislam <
Dinislam.Salikhov@REDACTED> wrote:

> Is there any rationale for write operation being done this way?
> 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.

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

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20171024/2be4debc/attachment.htm>

More information about the erlang-questions mailing list