From: David Goulet Date: Wed, 30 Jun 2010 13:04:41 +0000 (-0400) Subject: Removing NO_IPI ifdef for memory barrier. The smp_wmb should be used all the time... X-Git-Tag: v0.6~14 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=6a843332a8ac7d1125e0961f148cc494e0397923;p=ust.git Removing NO_IPI ifdef for memory barrier. The smp_wmb should be used all the time here. Signed-off-by: David Goulet --- diff --git a/libust/buffers.h b/libust/buffers.h index 00655a4..4fa6262 100644 --- a/libust/buffers.h +++ b/libust/buffers.h @@ -369,7 +369,7 @@ static __inline__ int ltt_reserve_slot(struct ust_channel *chan, /* * Perform retryable operations. */ - /* FIXME: make this rellay per cpu? */ + /* FIXME: make this really per cpu? */ if (unlikely(LOAD_SHARED(ltt_nesting) > 4)) { DBG("Dropping event because nesting is too deep."); uatomic_inc(&buf->events_lost); @@ -483,16 +483,8 @@ static __inline__ void ltt_commit_slot( long endidx = SUBBUF_INDEX(offset_end - 1, chan); long commit_count; -#ifdef LTT_NO_IPI_BARRIER smp_wmb(); -#else - /* - * Must write slot data before incrementing commit count. - * This compiler barrier is upgraded into a smp_mb() by the IPI - * sent by get_subbuf(). - */ - barrier(); -#endif + uatomic_add(&buf->commit_count[endidx].cc, slot_size); /* * commit count read can race with concurrent OOO commit count updates.