LWN.net Logo

RCU part 3: the RCU API

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:

  1. 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.
  2. 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.
  3. Good catch! s/an the/the/


(Log in to post comments)

RCU part 3: the RCU API

Posted Jan 31, 2008 2:34 UTC (Thu) by ris (editor, #5) [Link]

> Good catch! s/an the/the/

Fixed!

RCU part 3: the RCU API

Posted Jan 31, 2008 11:18 UTC (Thu) by PaulMcKenney (subscriber, #9624) [Link]

Thank you very much!!!

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds