From: compudj@krystal.dyndns.org (Mathieu Desnoyers)
Subject: [ltt-dev] [URCU RFC patch 2/3] call_rcu: use futex for wakeup scheme
Date: Wed, 8 Jun 2011 18:31:07 -0400 [thread overview]
Message-ID: <BLU0-SMTP3919831E9C87EA8815511896620@phx.gbl> (raw)
In-Reply-To: <isn6u4$f1v$1@dough.gmane.org>
* Paolo Bonzini (pbonzini at redhat.com) wrote:
> 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?
Good catch! I missed those parts from the urcu.c wait/wakeup scheme
(decrement initially, and also set to 0 explicitely when breaking the
loop without waiting). I just added them with commit
c768e45ed336970a42e58e679804f0f455422cd8
Thanks!
Mathieu
>
> Paolo
>
>
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
>
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
next prev parent reply other threads:[~2011-06-08 22:31 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 ` [ltt-dev] " Paolo Bonzini
2011-06-08 22:31 ` Mathieu Desnoyers [this message]
[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=BLU0-SMTP3919831E9C87EA8815511896620@phx.gbl \
--to=compudj@krystal.dyndns.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