summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7a5a38f)
Even though the memory barriers within update_counter_and_wait() are proven not
to be needed in urcu-mb/signal/qsbr implementations, we leave them in place as
an engineering safety factor. Basically, we've proven they are not required
(formally for urcu-mb and urcu-signal by model checking, less formally for
urcu-qsbr by looking at the execution order of concurrent synchronize_rcu() and
RCU read-sides with out-of-order load/stores). However, given that on the
overall performance impact of synchronize_rcu(), these memory barriers do not
add a significant overhead, let's leave them in place with a comment stating
that they are not required.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
* Enforce compiler-order of store to rcu_gp_ctr before before
* load rcu_reader ctr.
* This ensures synchronize_rcu() cannot be starved by readers.
* Enforce compiler-order of store to rcu_gp_ctr before before
* load rcu_reader ctr.
* This ensures synchronize_rcu() cannot be starved by readers.
+ *
+ * Adding a smp_mb() which is _not_ formally required, but makes the
+ * model easier to understand. It does not have a big performance impact
+ * anyway, given this is the write-side.
/*
* Wait for each thread rcu_reader_qs_gp count to become 0.
/*
* Wait for each thread rcu_reader_qs_gp count to become 0.
+ * Enforce compiler-order of store to rcu_gp_ctr before before
+ * load rcu_reader ctr.
+ * This ensures synchronize_rcu() cannot be starved by readers.
+ *
* Adding a smp_mb() which is _not_ formally required, but makes the
* model easier to understand. It does not have a big performance impact
* anyway, given this is the write-side.
* Adding a smp_mb() which is _not_ formally required, but makes the
* model easier to understand. It does not have a big performance impact
* anyway, given this is the write-side.