• Paul E. McKenney's avatar
    rcu: Permit call_rcu() from CPU_DYING notifiers · 92c38702
    Paul E. McKenney authored
    As of:
    
      29494be7 ("rcu,cleanup: simplify the code when cpu is dying")
    
    RCU adopts callbacks from the dying CPU in its CPU_DYING notifier,
    which means that any callbacks posted by later CPU_DYING notifiers
    are ignored until the CPU comes back online.
    
    A WARN_ON_ONCE() was added to __call_rcu() by:
    
      e5601400 ("rcu: Simplify offline processing")
    
    to check for this condition.  Although this condition did not trigger
    (at least as far as I know) during -next testing, it did recently
    trigger in mainline:
    
      https://lkml.org/lkml/2012/4/2/34
    
    What is needed longer term is for RCU's CPU_DEAD notifier to adopt any
    callbacks that were posted by CPU_DYING notifiers, however, the Linux
    kernel has been running with this sort of thing happening for quite
    some time.  So the only thing that qualifies as a regression is the
    WARN_ON_ONCE(), which this commit removes.
    
    Making RCU's CPU_DEAD notifier adopt callbacks posted by CPU_DYING
    notifiers is a topic for the 3.5 release of the Linux kernel.
    Reported-by: default avatarSergey Senozhatsky <sergey.senozhatsky@gmail.com>
    Signed-off-by: default avatarPaul E. McKenney <paul.mckenney@linaro.org>
    Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
    92c38702
rcutree.c 79.2 KB