lttng-dev.lists.lttng.org archive mirror
 help / color / mirror / Atom feed
From: Mike Day <ncmike@ncultra.org>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: rp@svcs.cs.pdx.edu, qemu-devel@nongnu.org,
	lttng-dev@lists.lttng.org,
	Anthony Liguori <anthony@codemonkey.ws>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Paul Mckenney <paulmck@linux.vnet.ibm.com>
Subject: Re: [RFC PATCH] Introduce RCU-enabled DQs (v2)
Date: Mon, 26 Aug 2013 17:48:12 -0400	[thread overview]
Message-ID: <CAGaKXu1V5Cz+9b=v=HEt2kn=2sJiD+ORm_9SyB7v35zNXWWUOw@mail.gmail.com> (raw)
In-Reply-To: <20130825191835.GA1073@Krystal>

[-- Attachment #1: Type: text/plain, Size: 1453 bytes --]

On Sun, Aug 25, 2013 at 3:18 PM, Mathieu Desnoyers <
mathieu.desnoyers@efficios.com> wrote:
>
> I'm not very comfortable with your DQ implementation not providing any
> kind of guarantee to a forward traversal followed by backward traversal,
> nor for backward followed by forward traversal. If a list add is
> executed concurrently with traversals, and we can ensure there are no
> list del of the node, if a traversal sees the added node when doing
> forward iteration, I would clearly expect to still see it if a backward
> iteration follows.
>
> I took the liberty of implementing a couple of ideas I had to provide
> a RCU DQ with those guarantees. I just pushed the code here (beware, I
> just did some basic single-threaded unit tests so far, so consider this
> code as largely untested concurrency-wise):
>
>   git clone git://git.urcu.io/urcu.git
>   branch: rcudq
>   file: urcu/rcudq.h
>
> Direct link to the file via gitweb:
>
http://git.lttng.org/?p=userspace-rcu.git;a=blob;f=urcu/rcudq.h;h=4a8d7b0d5143a958514cf130b1c124d99f3194ca;hb=refs/heads/rcudq

Mathieu - Thanks for the review! And thanks for the code, I'm working with
it right now. I like the idea of using a flag to provide a form of
atomicity for the doubly-linked list elements. I'm also planning on running
some timing tests to see of the additional memory barriers and atomic
accesses make *any* difference whatsoever.

Mike

Mike Day | ncmike@ncultra.org | +1 919 371-8786

[-- Attachment #2: Type: text/html, Size: 1998 bytes --]

  parent reply	other threads:[~2013-08-26 21:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1377371209-2017-1-git-send-email-ncmike@ncultra.org>
2013-08-25 19:18 ` [RFC PATCH] Introduce RCU-enabled DQs (v2) Mathieu Desnoyers
     [not found] ` <20130825191835.GA1073@Krystal>
2013-08-26 21:48   ` Mike Day [this message]
2013-08-26 22:23     ` Paolo Bonzini

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='CAGaKXu1V5Cz+9b=v=HEt2kn=2sJiD+ORm_9SyB7v35zNXWWUOw@mail.gmail.com' \
    --to=ncmike@ncultra.org \
    --cc=anthony@codemonkey.ws \
    --cc=lttng-dev@lists.lttng.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rp@svcs.cs.pdx.edu \
    /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;
as well as URLs for NNTP newsgroup(s).