[Oisf-devel] [PATCH 0/6] Align elements in 'trans_q' and 'data_queues' array

Holger Eitzenberger holger at eitzenberger.org
Wed Oct 23 13:04:25 UTC 2013

Hi Victor,

what follows is a small patchset for RFC which tries to address the
false sharing happening on both the 'trans_q' and 'data_queues'
arrays.  They are therefore a performance improvement on installations
having many queues.

Patches are against the 'master' branch.

The first patch is just cleanup, as it only introduces NUM_QUEUES.
But from grepping through the source I see that I may not have spotted
all places.

The 2nd patch changes the 'trans_q' array to allocate each instance
individually, as AFAIK only then the alignment per element can be
specified later.  I also add the __ALIGN() macro, which allows
to align the array itself.  I have used a small semantic patch
(coccinelle) to change the callers.

The 3rd patch does the same to the 'data_queues' array.

The 4th patch corrects the declaration of GlobalInits().

The 5th patch introduces GlobalFrees(), which is then used in the
error patch of GlobalInits().  The use there is currently a bit
pointless, as the program is terminated shortly after.  So the
function is mostly added for possible future users.

The last patch actually aligns the queues themself.

These are my first patches for Suricata :).  I therefore appreciate
any advise on coding style etc.

I wasn't able to actually test the performance improvent yet, but I
can do so next week if need be.

Please check.


More information about the Oisf-devel mailing list