diff options
Diffstat (limited to 'include/linux/sched.h')
| -rw-r--r-- | include/linux/sched.h | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 10a83d8d5775..af2ed4bae678 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -894,6 +894,34 @@ struct sched_entity { | |||
| 894 | #endif | 894 | #endif |
| 895 | }; | 895 | }; |
| 896 | 896 | ||
| 897 | #ifdef CONFIG_CGROUPS | ||
| 898 | |||
| 899 | #define SUBSYS(_x) _x ## _subsys_id, | ||
| 900 | enum cgroup_subsys_id { | ||
| 901 | #include <linux/cgroup_subsys.h> | ||
| 902 | CGROUP_SUBSYS_COUNT | ||
| 903 | }; | ||
| 904 | #undef SUBSYS | ||
| 905 | |||
| 906 | /* A css_set is a structure holding pointers to a set of | ||
| 907 | * cgroup_subsys_state objects. | ||
| 908 | */ | ||
| 909 | |||
| 910 | struct css_set { | ||
| 911 | |||
| 912 | /* Set of subsystem states, one for each subsystem. NULL for | ||
| 913 | * subsystems that aren't part of this hierarchy. These | ||
| 914 | * pointers reduce the number of dereferences required to get | ||
| 915 | * from a task to its state for a given cgroup, but result | ||
| 916 | * in increased space usage if tasks are in wildly different | ||
| 917 | * groupings across different hierarchies. This array is | ||
| 918 | * immutable after creation */ | ||
| 919 | struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT]; | ||
| 920 | |||
| 921 | }; | ||
| 922 | |||
| 923 | #endif /* CONFIG_CGROUPS */ | ||
| 924 | |||
| 897 | struct task_struct { | 925 | struct task_struct { |
| 898 | volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ | 926 | volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ |
| 899 | void *stack; | 927 | void *stack; |
| @@ -1130,6 +1158,9 @@ struct task_struct { | |||
| 1130 | int cpuset_mems_generation; | 1158 | int cpuset_mems_generation; |
| 1131 | int cpuset_mem_spread_rotor; | 1159 | int cpuset_mem_spread_rotor; |
| 1132 | #endif | 1160 | #endif |
| 1161 | #ifdef CONFIG_CGROUPS | ||
| 1162 | struct css_set cgroups; | ||
| 1163 | #endif | ||
| 1133 | #ifdef CONFIG_FUTEX | 1164 | #ifdef CONFIG_FUTEX |
| 1134 | struct robust_list_head __user *robust_list; | 1165 | struct robust_list_head __user *robust_list; |
| 1135 | #ifdef CONFIG_COMPAT | 1166 | #ifdef CONFIG_COMPAT |
| @@ -1625,7 +1656,8 @@ static inline int thread_group_empty(struct task_struct *p) | |||
| 1625 | /* | 1656 | /* |
| 1626 | * Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring | 1657 | * Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring |
| 1627 | * subscriptions and synchronises with wait4(). Also used in procfs. Also | 1658 | * subscriptions and synchronises with wait4(). Also used in procfs. Also |
| 1628 | * pins the final release of task.io_context. Also protects ->cpuset. | 1659 | * pins the final release of task.io_context. Also protects ->cpuset and |
| 1660 | * ->cgroup.subsys[]. | ||
| 1629 | * | 1661 | * |
| 1630 | * Nests both inside and outside of read_lock(&tasklist_lock). | 1662 | * Nests both inside and outside of read_lock(&tasklist_lock). |
| 1631 | * It must not be nested with write_lock_irq(&tasklist_lock), | 1663 | * It must not be nested with write_lock_irq(&tasklist_lock), |
