[zeromq-dev] Improving latency using futexes?

Steven McCoy steven.mccoy at miru.hk
Tue Nov 24 18:34:18 CET 2009


2009/11/24 Martin Sustrik <sustrik at 250bpm.com>

> My assumption was that by using futex directly we avoid an atomic operation
> that glibc mutex performs in user space before passing control to the
> kernel.
>
>
The entire point of the atomic operations in user space is to avoid going to
the kernel, swapping context to the kernel is expensive.  In the best case
scenario - i.e. no lock, no swap to the kernel occurs, when there is a lock
the futex call is invoked to govern the locking process.

-- 
Steve-o
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20091124/de4dffb8/attachment.html>


More information about the zeromq-dev mailing list