Update rcu comment
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 25 Oct 2022 16:20:34 +0000 (12:20 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 25 Oct 2022 16:20:34 +0000 (12:20 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/rcu.h

index 3b5d44ca82077ba3e5f130140c319f9d35b99c72..ab2e4c82b401bac8b24b845725c5ba3f2f72acd3 100644 (file)
--- a/src/rcu.h
+++ b/src/rcu.h
@@ -38,6 +38,10 @@ unsigned int side_rcu_read_begin(struct side_rcu_gp_state *gp_state)
 
        if (cpu < 0)
                cpu = 0;
+       /*
+        * This acquire MO pairs with the release fence at the end of
+        * side_rcu_wait_grace_period().
+        */
        (void) __atomic_add_fetch(&gp_state->percpu_state[cpu].count[period].begin, 1, __ATOMIC_ACQUIRE);
        return period;
 }
@@ -49,6 +53,10 @@ void side_rcu_read_end(struct side_rcu_gp_state *gp_state, unsigned int period)
 
        if (cpu < 0)
                cpu = 0;
+       /*
+        * This release MO pairs with the acquire fence at the beginning
+        * of side_rcu_wait_grace_period().
+        */
        (void) __atomic_add_fetch(&gp_state->percpu_state[cpu].count[period].end, 1, __ATOMIC_RELEASE);
 }
 
This page took 0.028939 seconds and 4 git commands to generate.