[zeromq-dev] [PATCH] ypipe cache line alignment
Martin Pales
m.pales at gmail.com
Thu Apr 28 10:36:14 CEST 2011
Hi Jon,
I updated my local libzmq sources a couple of weeks ago and created test
programs to see the real benefit
of those changes. My changes were based on simple paddings since there is no
support for aligned attribute
in the solaris sun studio compiler. Additionally to your changes I also
updated yqueue.hpp.
However, I was not able to see any substantial benefit on my hardware(2
xeon processors with 4C/8T each)
and thus hesitated to send it for review.
Anyway, please find attached also my patch and those test programs. They
create an ipc or inproc pipeline
(PUSH/PULL) with arbitrary number of stages (via command line parameter) to
force more threads into action.
It is also possible to specify number of I/O threads via command line.
Martin
On Thu, Apr 28, 2011 at 12:43 AM, Jon Dyte <jon at totient.co.uk> wrote:
> Hi
>
> Following a suggestion on irc a couple of weeks ago by Martin Pales here's
> a small patch for review which
> should move the ypipe and the member fields where necessary onto separate
> cache lines to eliminate
> sharing in the case where the member fields are exclusively used only by
> one thread.
>
> This patch only takes effect on Linux i386 and x86/64 with gcc as it uses
> gcc specific alignment attributes.
>
>
> Jon
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110428/bd0c0b68/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-PATCH-Added-paddings-to-ypipe-and-yqueue-to-avoid-fa.patch
Type: application/octet-stream
Size: 20256 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110428/bd0c0b68/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipc_pipeline_thr.cpp
Type: text/x-c++src
Size: 7358 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110428/bd0c0b68/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: inproc_pipeline_thr.cpp
Type: text/x-c++src
Size: 7361 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110428/bd0c0b68/attachment-0001.cpp>
More information about the zeromq-dev
mailing list