RCU part 3: the RCU API
Posted Jan 31, 2008 2:04 UTC (Thu) by
PaulMcKenney (subscriber, #9624)
In reply to:
RCU part 3: the RCU API by jarkao2
Parent article:
RCU part 3: the RCU API
Good questions! Point-by-point answers:
- Your example might or might not be legal, depending on what
primitive you used to wait for a grace period. If you are using
call_rcu() or synchronize_rcu(),
your example is technically illegal for Classic RCU
and prone to failure for realtime RCU. If you are
using synchronize_srcu(), your example
is technically illegal, but will work given the current
implementation. If you are using call_rcu_bh()
or synchronize_qrcu(), your example is
illegal and prone to failure. Finally, if you are using
synchronize_sched(), your example is entirely
legal, because preempt_disable() introduces an RCU
read-side critical section. You could create a similar list for
your _ bh example. But please note that if I see
anyone submitting a patch in the "technically illegal but works"
category, I will NACK it.
- One could indeed have listed more things in that cell: no _bh
enabling, no blocking, and, as you say, no softirq enabling.
The reason that there is not yet an rcu_bh_barrier() is that
there has not been a clear need for it yet -- which might change
if someone needs call_rcu_bh() in a module.
- Good catch! s/an the/the/
(
Log in to post comments)