[systemd-devel] [RFC 6/8] HACK2: blocking ioctl(CMD_MSG_RECV)

microcai microcai at fedoraproject.org
Wed Jun 25 20:39:43 PDT 2014


2014-06-25 18:30 GMT+08:00 Kay Sievers <kay at vrfy.org>:
> On Wed, Jun 25, 2014 at 11:13 AM, AKASHI Takahiro
> <takahiro.akashi at linaro.org> wrote:
>> In the current implementation, ioctl(CMD_MSG_RECV) returns immediately if
>> no message has been queued, and so a service process has to wait by
>> explicitly calling poll() system call. If such a process needs to wait only
>> on a single connection, we can eliminate poll() system call by adding a
>> synchronous attribute in receiving a message.
>
> Why is this useful in general? The peer can call RECV in a loop until
> EAGAIN without ever needing to call poll() as long as data is
> available.
>
> When there is no more message to handle, poll() is used to suspend the
> process, and only when it is idle anyway.
>
> Busy processes, the use-case we would optimize for, should not see a
> real benefit here?

And library can simulate the sync calls by revc + poll anyway.
There is no real benefit.


More information about the systemd-devel mailing list