summaryrefslogtreecommitdiff
path: root/include/linux/cgroup.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2014-05-04 15:09:13 -0400
committerTejun Heo <tj@kernel.org>2014-05-04 15:09:13 -0400
commit69dfa00ccb72a37f3810687ca110e5a8154c6eed (patch)
tree8e4c8511c940f844d555c3791fce13bbda1f7d73 /include/linux/cgroup.h
parented3d261b53f51c9505822d757d1800c79fb68788 (diff)
cgroup: make flags and subsys_masks unsigned int
There's no reason to use atomic bitops for cgroup_subsys_state->flags, cgroup_root->flags and various subsys_masks. This patch updates those to use bitwise and/or operations instead and converts them form unsigned long to unsigned int. This makes the fields occupy (marginally) smaller space and makes it clear that they don't require atomicity. This patch doesn't cause any behavior difference. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'include/linux/cgroup.h')
-rw-r--r--include/linux/cgroup.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 4b38e2d6110d..c6c703f2486b 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -62,7 +62,7 @@ struct cgroup_subsys_state {
/* the parent css */
struct cgroup_subsys_state *parent;
- unsigned long flags;
+ unsigned int flags;
/* percpu_ref killing and RCU release */
struct rcu_head rcu_head;
@@ -185,7 +185,7 @@ struct cgroup {
u64 serial_nr;
/* the bitmask of subsystems enabled on the child cgroups */
- unsigned long child_subsys_mask;
+ unsigned int child_subsys_mask;
/* Private pointers for each registered subsystem */
struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
@@ -312,7 +312,7 @@ struct cgroup_root {
struct kernfs_root *kf_root;
/* The bitmask of subsystems attached to this hierarchy */
- unsigned long subsys_mask;
+ unsigned int subsys_mask;
/* Unique id for this hierarchy. */
int hierarchy_id;
@@ -327,7 +327,7 @@ struct cgroup_root {
struct list_head root_list;
/* Hierarchy-specific flags */
- unsigned long flags;
+ unsigned int flags;
/* IDs for cgroups in this hierarchy */
struct idr cgroup_idr;