From c000c930b2893cd9181c68c31b89eb7a835302ab Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Thu, 5 Jan 2017 14:23:20 -0700 Subject: [PATCH] event: align spdk_reactor to cache line boundary The reactor structures are allocated in a contiguous array, and each reactor is accessed from a different core, so align the reactor structure to avoid false sharing. Change-Id: I95162620ccb58fae060b2d95e47a38621dfbd140 Signed-off-by: Daniel Verkamp --- lib/event/reactor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/event/reactor.c b/lib/event/reactor.c index fc55e3ebb..fa9124508 100644 --- a/lib/event/reactor.c +++ b/lib/event/reactor.c @@ -114,7 +114,7 @@ struct spdk_reactor { struct rte_ring *events; uint64_t max_delay_us; -}; +} __attribute__((aligned(64))); static struct spdk_reactor g_reactors[RTE_MAX_LCORE]; static uint64_t g_reactor_mask = 0;