From: Victor Julien Date: Wed, 13 Nov 2019 10:39:44 +0000 (+0100) Subject: threading/threadvars: optimize layout X-Git-Tag: suricata-6.0.0-beta1~783 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45e5e19e6efefa4ff0197b65c697c9501a7961a3;p=thirdparty%2Fsuricata.git threading/threadvars: optimize layout Make sure StatsPublicThreadContext is on its own cache line. --- diff --git a/src/threadvars.h b/src/threadvars.h index 3c18f64e5d..ccf84960f9 100644 --- a/src/threadvars.h +++ b/src/threadvars.h @@ -119,6 +119,9 @@ typedef struct ThreadVars_ { /** private counter store: counter updates modify this */ StatsPrivateThreadContext perf_private_ctx; + /** pointer to the next thread */ + struct ThreadVars_ *next; + /** public counter store: counter syncs update this */ StatsPublicThreadContext perf_public_ctx; @@ -127,9 +130,6 @@ typedef struct ThreadVars_ { SCCtrlMutex *ctrl_mutex; SCCtrlCondT *ctrl_cond; - /** pointer to the next thread */ - struct ThreadVars_ *next; - } ThreadVars; /** Thread setup flags: */