From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers)
Subject: [lttng-dev] [URCU PATCH 1/3] wfcqueue: implement concurrency-efficient queue
Date: Wed, 10 Oct 2012 00:50:12 -0400 [thread overview]
Message-ID: <20121010045012.GA32082@Krystal> (raw)
In-Reply-To: <5074E3F5.3080005@cn.fujitsu.com>
* Lai Jiangshan (laijs at cn.fujitsu.com) wrote:
> On 10/02/2012 10:14 PM, Mathieu Desnoyers wrote:
[...]
> > --- /dev/null
> > +++ b/urcu/wfcqueue.h
> > @@ -0,0 +1,263 @@
> > +#ifndef _URCU_WFCQUEUE_H
> > +#define _URCU_WFCQUEUE_H
> > +
> > +/*
> > + * wfcqueue.h
> > + *
> > + * Userspace RCU library - Concurrent Queue with Wait-Free Enqueue/Blocking Dequeue
> > + *
> > + * Copyright 2010-2012 - Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> > + * Copyright 2011-2012 - Lai Jiangshan <laijs at cn.fujitsu.com>
> > + *
> > + * This library is free software; you can redistribute it and/or
> > + * modify it under the terms of the GNU Lesser General Public
> > + * License as published by the Free Software Foundation; either
> > + * version 2.1 of the License, or (at your option) any later version.
> > + *
> > + * This library is distributed in the hope that it will be useful,
> > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> > + * Lesser General Public License for more details.
> > + *
> > + * You should have received a copy of the GNU Lesser General Public
> > + * License along with this library; if not, write to the Free Software
> > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> > + */
> > +
> > +#include <pthread.h>
> > +#include <assert.h>
> > +#include <stdbool.h>
> > +#include <urcu/compiler.h>
> > +#include <urcu/arch.h>
> > +
> > +#ifdef __cplusplus
> > +extern "C" {
> > +#endif
> > +
> > +/*
> > + * Concurrent queue with wait-free enqueue/blocking dequeue.
> > + *
> > + * Inspired from half-wait-free/half-blocking queue implementation done by
> > + * Paul E. McKenney.
> > + */
> > +
> > +struct cds_wfcq_node {
> > + struct cds_wfcq_node *next;
> > +};
> > +
> > +/*
> > + * 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 cds_wfcq_head {
> > + struct cds_wfcq_node node;
> > + pthread_mutex_t lock;
> > +};
> > +
> > +struct cds_wfcq_tail {
> > + struct cds_wfcq_node *p;
> > +};
>
> Why use "p" here?
For lack of imagination. ;) Do you have something better to propose ?
>
> I don't see the commits in the public git-tree. Or you forgot to update the
> tree and make "http" address happy.
I have pushed those into the userspace RCU master branch a couple of
days after posting them to the mailing lists. I just synchronized my
urcu/wfcqueue volatile dev branch, but I expect to drop it soon, since
it's now merged back into master.
Thanks!
Mathieu
>
> Thanks,
> Lai
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
next prev parent reply other threads:[~2012-10-10 4:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-02 14:13 [lttng-dev] [URCU PATCH 0/3] wait-free concurrent queues (wfcqueue) Mathieu Desnoyers
2012-10-02 14:14 ` [lttng-dev] [URCU PATCH 1/3] wfcqueue: implement concurrency-efficient queue Mathieu Desnoyers
2012-10-08 15:47 ` Paolo Bonzini
2012-10-08 16:15 ` Mathieu Desnoyers
2012-10-08 16:33 ` Paolo Bonzini
2012-10-08 18:10 ` Mathieu Desnoyers
2012-10-10 2:56 ` Lai Jiangshan
2012-10-10 4:50 ` Mathieu Desnoyers [this message]
2012-10-02 14:15 ` [lttng-dev] [URCU PATCH 2/3] wfcqueue test Mathieu Desnoyers
2012-10-02 14:16 ` [lttng-dev] [URCU PATCH 3/3] call_rcu: use wfcqueue, eliminate false-sharing Mathieu Desnoyers
2012-10-08 3:09 ` Lai Jiangshan
2012-10-08 14:49 ` Mathieu Desnoyers
2012-10-08 15:10 ` Paul E. McKenney
2012-10-08 16:03 ` Mathieu Desnoyers
2012-10-03 18:28 ` [lttng-dev] [rp] [URCU PATCH 0/3] wait-free concurrent queues (wfcqueue) Paul E. McKenney
2012-10-03 21:04 ` Mathieu Desnoyers
2012-10-04 18:51 ` Paul E. McKenney
2012-10-08 3:33 ` Lai Jiangshan
2012-10-08 15:07 ` Mathieu Desnoyers
2012-10-10 2:53 ` Lai Jiangshan
2012-10-10 4:59 ` Mathieu Desnoyers
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=20121010045012.GA32082@Krystal \
--to=mathieu.desnoyers@efficios.com \
/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