From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers)
Subject: [ltt-dev] [UST PATCH] UST synchronization fix
Date: Wed, 11 Aug 2010 10:13:42 -0400 [thread overview]
Message-ID: <20100811141342.GA24267@Krystal> (raw)
Missing smp_wmb() at subbuffer switch.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
---
git/ust/libust/buffers.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: ust/libust/buffers.c
===================================================================
--- ust/libust/buffers.c 2010-08-10 16:16:39.000000000 -0400
+++ ust/libust/buffers.c 2010-08-10 16:19:59.000000000 -0400
@@ -858,7 +858,7 @@ static void ltt_reserve_switch_old_subbu
* This compiler barrier is upgraded into a smp_wmb() by the IPI
* sent by get_subbuf() when it does its smp_rmb().
*/
- barrier();
+ smp_wmb();
uatomic_add(&buf->commit_count[oldidx].cc, padding_size);
commit_count = uatomic_read(&buf->commit_count[oldidx].cc);
ltt_check_deliver(chan, buf, offsets->old - 1, commit_count, oldidx);
@@ -887,7 +887,7 @@ static void ltt_reserve_switch_new_subbu
* This compiler barrier is upgraded into a smp_wmb() by the IPI
* sent by get_subbuf() when it does its smp_rmb().
*/
- barrier();
+ smp_wmb();
uatomic_add(&buf->commit_count[beginidx].cc, ltt_subbuffer_header_size());
commit_count = uatomic_read(&buf->commit_count[beginidx].cc);
/* Check if the written buffer has to be delivered */
@@ -932,7 +932,7 @@ static void ltt_reserve_end_switch_curre
* This compiler barrier is upgraded into a smp_wmb() by the IPI
* sent by get_subbuf() when it does its smp_rmb().
*/
- barrier();
+ smp_wmb();
uatomic_add(&buf->commit_count[endidx].cc, padding_size);
commit_count = uatomic_read(&buf->commit_count[endidx].cc);
ltt_check_deliver(chan, buf,
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
next reply other threads:[~2010-08-11 14:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-11 14:13 Mathieu Desnoyers [this message]
[not found] ` <AANLkTikd7wEY7YciqxgzWFbC7wLi1quZpJPhRwr69StT@mail.gmail.com>
[not found] ` <20100811155627.GA24570@Krystal>
[not found] ` <AANLkTimWD+taSsqrCR+O4gFT=qdPfmYFYgkYohn6pWj+@mail.gmail.com>
2010-08-12 18:42 ` Mathieu Desnoyers
2010-08-12 19:37 ` chris meyers
2010-08-12 19:37 ` chris meyers
2010-08-12 19:37 ` chris meyers
2010-08-16 4:48 ` Pierre-Marc Fournier
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=20100811141342.GA24267@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