memory management talk + patches for femalloc+xtbench
 help / color / mirror / Atom feed
* [PATCH] xthr: put queue head and tail on separate cache lines
@ 2014-07-30 22:25 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2014-07-30 22:25 UTC (permalink / raw)
  To: mm; +Cc: Eric Wong

This should reduce cache line contention.
---
 xthr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xthr.c b/xthr.c
index 6159e82..604a448 100644
--- a/xthr.c
+++ b/xthr.c
@@ -21,10 +21,10 @@
 #include <err.h>
 #include <stdio.h>
 
+static struct cds_wfcq_head head;
 static size_t iter = 1024;
 static size_t mbytes = sizeof(struct cds_wfcq_node);
-static struct cds_wfcq_head head;
-static struct cds_wfcq_tail tail;
+static struct cds_wfcq_tail tail __attribute__((aligned(CAA_CACHE_LINE_SIZE)));
 
 static void *do_free(void *arg)
 {
-- 
EW


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-07-30 22:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-30 22:25 [PATCH] xthr: put queue head and tail on separate cache lines Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox