[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1363308584.3194.124.camel@thor.lan>
Date: Thu, 14 Mar 2013 20:49:44 -0400
From: Peter Hurley <peter@...leysoftware.com>
To: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc: Eric Wong <normalperson@...t.net>,
Lai Jiangshan <laijs@...fujitsu.com>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Stephen Hemminger <shemminger@...tta.com>,
Davide Libenzi <davidel@...ilserver.org>,
linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue
Implementation
On Mon, 2013-03-11 at 17:36 -0400, Mathieu Desnoyers wrote:
> +/*
> + * Do not put head and tail on the same cache-line if concurrent
> + * enqueue/dequeue are expected from many CPUs. This eliminates
> + * false-sharing between enqueue and dequeue.
> + */
> +struct wfcq_head {
> + struct wfcq_node node;
> + struct mutex lock;
> +};
> +
> +struct wfcq_tail {
> + struct wfcq_node *p;
> +};
If you want to force separate cachelines for SMP, this would be
struct wfcq_head {
struct wfcq_node node;
struct mutex lock;
} ____cacheline_aligned_in_smp;
struct wfcq_tail {
struct wfcq_node *p;
} ____cacheline_aligned_in_smp;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists