aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cgroup.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2018-04-26 17:29:05 -0400
committerTejun Heo <tj@kernel.org>2018-04-26 17:29:05 -0400
commit0fa294fb1985c06c4e3325e30e759d4ca580f59a (patch)
tree41bc9abc473d8df21ab0cb1dca6c1b8746abcacb /include/linux/cgroup.h
parent6162cef0f741c70eb0c7ac7e6142f85808d8abc4 (diff)
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.h1
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,
696 */ 696 */
697void cgroup_rstat_updated(struct cgroup *cgrp, int cpu); 697void cgroup_rstat_updated(struct cgroup *cgrp, int cpu);
698void cgroup_rstat_flush(struct cgroup *cgrp); 698void cgroup_rstat_flush(struct cgroup *cgrp);
699void cgroup_rstat_flush_irqsafe(struct cgroup *cgrp);
699void cgroup_rstat_flush_hold(struct cgroup *cgrp); 700void cgroup_rstat_flush_hold(struct cgroup *cgrp);
700void cgroup_rstat_flush_release(void); 701void cgroup_rstat_flush_release(void);
701 702