From mboxrd@z Thu Jan 1 00:00:00 1970 From: pierre-marc.fournier@polymtl.ca (Pierre-Marc Fournier) Date: Mon, 16 Aug 2010 00:48:43 -0400 Subject: [ltt-dev] [UST PATCH] UST synchronization fix In-Reply-To: <20100811141342.GA24267@Krystal> References: <20100811141342.GA24267@Krystal> Message-ID: <4C68C32B.9050204@polymtl.ca> Merged, thanks. On 08/11/2010 10:13 AM, Mathieu Desnoyers wrote: > Missing smp_wmb() at subbuffer switch. > > Signed-off-by: Mathieu Desnoyers > --- > 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,