Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: pbonzini@redhat.com (Paolo Bonzini)
Subject: [ltt-dev] [URCU RFC patch 2/3] call_rcu: use futex for wakeup scheme
Date: Wed, 08 Jun 2011 09:04:36 +0200	[thread overview]
Message-ID: <isn6u4$f1v$1@dough.gmane.org> (raw)
In-Reply-To: <20110606175029.073385695@efficios.com>

On 06/06/2011 07:46 PM, Mathieu Desnoyers wrote:
> +static void call_rcu_wait(struct call_rcu_data *crdp)
> +{
> +	/* Read call_rcu list before read futex */
> +	cmm_smp_mb();
> +	if (uatomic_read(&crdp->futex) == -1)
> +		futex_async(&crdp->futex, FUTEX_WAIT, -1,
> +		      NULL, NULL, 0);
> +}
> +
> +static void call_rcu_wake_up(struct call_rcu_data *crdp)
> +{
> +	/* Write to call_rcu list before reading/writing futex */
> +	cmm_smp_mb();
> +	if (unlikely(uatomic_read(&crdp->futex) == -1)) {
> +		uatomic_set(&crdp->futex, 0);
> +		futex_async(&crdp->futex, FUTEX_WAKE, 1,
> +		      NULL, NULL, 0);
> +	}
> +}

I don't see crdp->futex ever set to -1, am I missing something obvious?

Paolo





  parent reply	other threads:[~2011-06-08  7:04 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-06 17:45 [ltt-dev] [URCU RFC patch 0/3] call_rcu() performance improvements Mathieu Desnoyers
2011-06-06 17:45 ` [ltt-dev] [URCU RFC patch 1/3] call_rcu: use cpu affinity for per-cpu call_rcu threads Mathieu Desnoyers
2011-06-06 17:45   ` Mathieu Desnoyers
2011-06-06 17:45   ` Mathieu Desnoyers
2011-06-06 19:44   ` Paul E. McKenney
2011-06-06 20:47     ` Mathieu Desnoyers
2011-06-06 21:05       ` Paul E. McKenney
2011-06-06 21:25         ` Mathieu Desnoyers
2011-06-06 17:46 ` [ltt-dev] [URCU RFC patch 2/3] call_rcu: use futex for wakeup scheme Mathieu Desnoyers
2011-06-06 17:46   ` Mathieu Desnoyers
2011-06-06 17:46   ` Mathieu Desnoyers
2011-06-06 20:06   ` [ltt-dev] [rp] " Paul E. McKenney
2011-06-07  4:16     ` Mathieu Desnoyers
2011-06-08  7:04   ` Paolo Bonzini [this message]
2011-06-08 22:31     ` [ltt-dev] " Mathieu Desnoyers
     [not found]     ` <BLU0-SMTP38722641CF9CD185CCFFDC96620@phx.gbl>
2011-06-09  6:14       ` Paolo Bonzini
2011-06-06 17:46 ` [ltt-dev] [URCU RFC patch 3/3] call_rcu: remove delay " Mathieu Desnoyers
2011-06-06 17:46   ` Mathieu Desnoyers
2011-06-06 17:46   ` Mathieu Desnoyers
2011-06-06 19:21   ` Mathieu Desnoyers
2011-06-06 19:41     ` Paul E. McKenney
2011-06-06 21:29       ` [ltt-dev] [rp] " Phil Howard
2011-06-06 21:39         ` Paul E. McKenney
2011-06-06 22:41         ` Mathieu Desnoyers
2011-06-06 21:26     ` Phil Howard
2011-06-06 22:29       ` 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='isn6u4$f1v$1@dough.gmane.org' \
    --to=pbonzini@redhat.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