UST synchronization fix
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 11 Aug 2010 14:13:42 +0000 (10:13 -0400)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Mon, 16 Aug 2010 03:51:48 +0000 (23:51 -0400)
Missing smp_wmb() at subbuffer switch.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
libust/buffers.c

index 801a878cce5dd4c863ed6866fa4c2cbd3a90a0e5..c27b78877df625c33a23af1ff8f6af2f4277ad1b 100644 (file)
@@ -858,7 +858,7 @@ static void ltt_reserve_switch_old_subbuf(
         * 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_subbuf(
         * 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_current(
         * 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,
This page took 0.024935 seconds and 4 git commands to generate.