From: Eric Wong <e@80x24.org>
To: mm@80x24.org
Cc: Eric Wong <e@80x24.org>
Subject: [PATCH] xthr: put queue head and tail on separate cache lines
Date: Wed, 30 Jul 2014 22:25:26 +0000 [thread overview]
Message-ID: <1406759126-14843-1-git-send-email-e@80x24.org> (raw)
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
reply other threads:[~2014-07-30 22:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1406759126-14843-1-git-send-email-e@80x24.org \
--to=e@80x24.org \
--cc=mm@80x24.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox