Skip to content
  • Tejun Heo's avatar
    RCU, workqueue: Implement rcu_work · 05f0fe6b
    Tejun Heo authored
    
    
    There are cases where RCU callback needs to be bounced to a sleepable
    context.  This is currently done by the RCU callback queueing a work
    item, which can be cumbersome to write and confusing to read.
    
    This patch introduces rcu_work, a workqueue work variant which gets
    executed after a RCU grace period, and converts the open coded
    bouncing in fs/aio and kernel/cgroup.
    
    v3: Dropped queue_rcu_work_on().  Documented rcu grace period behavior
        after queue_rcu_work().
    
    v2: Use rcu_barrier() instead of synchronize_rcu() to wait for
        completion of previously queued rcu callback as per Paul.
    
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Acked-by: default avatar"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    05f0fe6b