diff options
author | Tejun Heo <tj@kernel.org> | 2018-04-26 14:29:05 -0700 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2018-04-26 14:29:05 -0700 |
commit | 0fa294fb1985c06c4e3325e30e759d4ca580f59a (patch) | |
tree | 41bc9abc473d8df21ab0cb1dca6c1b8746abcacb /include/linux/cgroup.h | |
parent | 6162cef0f741c70eb0c7ac7e6142f85808d8abc4 (diff) | |
download | linux-0fa294fb1985c06c4e3325e30e759d4ca580f59a.tar.gz linux-0fa294fb1985c06c4e3325e30e759d4ca580f59a.tar.bz2 linux-0fa294fb1985c06c4e3325e30e759d4ca580f59a.zip |
cgroup: Replace cgroup_rstat_mutex with a spinlock
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: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/cgroup.h')
-rw-r--r-- | include/linux/cgroup.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 5c6018fef5aa..c9fdf6f57913 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h @@ -696,6 +696,7 @@ static inline void cgroup_path_from_kernfs_id(const union kernfs_node_id *id, */ void cgroup_rstat_updated(struct cgroup *cgrp, int cpu); void cgroup_rstat_flush(struct cgroup *cgrp); +void cgroup_rstat_flush_irqsafe(struct cgroup *cgrp); void cgroup_rstat_flush_hold(struct cgroup *cgrp); void cgroup_rstat_flush_release(void); |