On Wed, May 05, 2010 at 09:28:41AM +0200, Tejun Heo wrote:
Makes sense to me!
The actual requirement is that, on each CPU, there must have been a
context switch between the end of the last RCU read-side critical
section and the end of a successful return from try_stop_cpus().
For CONFIG_TREE_PREEMPT_RCU, the guarantee required is a bit different:
on each CPU, either that CPU must not have been in an RCU read-side
critical section, or, if it was, there must have been a context switch
between the time that CPU entered its RCU read-side critical section
and the memory barrier executed within a successful try_stop_cpus().
As near as I can tell, the current implementation does meet these
requirements (but I do like your suggested change below).
If I understand the code correctly, this would be very good!
Thanx, Paul
--