Skip to content
  • Tejun Heo's avatar
    cgroup: Replace cgroup_rstat_mutex with a spinlock · 0fa294fb
    Tejun Heo authored
    
    
    Currently, rstat flush path is protected with a mutex which is fine as
    all the existing users are from interface file show path.  However,
    rstat is being generalized for use by controllers and flushing from
    atomic contexts will be necessary.
    
    This patch replaces cgroup_rstat_mutex with a spinlock and adds a
    irq-safe flush function - cgroup_rstat_flush_irqsafe().  Explicit
    yield handling is added to the flush path so that other flush
    functions can yield to other threads and flushers.
    
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    0fa294fb