diff options
Diffstat (limited to 'include/linux/psi.h')
| -rw-r--r-- | include/linux/psi.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/linux/psi.h b/include/linux/psi.h index b0daf050de58..8e0725aac0aa 100644 --- a/include/linux/psi.h +++ b/include/linux/psi.h | |||
| @@ -4,6 +4,9 @@ | |||
| 4 | #include <linux/psi_types.h> | 4 | #include <linux/psi_types.h> |
| 5 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
| 6 | 6 | ||
| 7 | struct seq_file; | ||
| 8 | struct css_set; | ||
| 9 | |||
| 7 | #ifdef CONFIG_PSI | 10 | #ifdef CONFIG_PSI |
| 8 | 11 | ||
| 9 | extern bool psi_disabled; | 12 | extern bool psi_disabled; |
| @@ -16,6 +19,14 @@ void psi_memstall_tick(struct task_struct *task, int cpu); | |||
| 16 | void psi_memstall_enter(unsigned long *flags); | 19 | void psi_memstall_enter(unsigned long *flags); |
| 17 | void psi_memstall_leave(unsigned long *flags); | 20 | void psi_memstall_leave(unsigned long *flags); |
| 18 | 21 | ||
| 22 | int psi_show(struct seq_file *s, struct psi_group *group, enum psi_res res); | ||
| 23 | |||
| 24 | #ifdef CONFIG_CGROUPS | ||
| 25 | int psi_cgroup_alloc(struct cgroup *cgrp); | ||
| 26 | void psi_cgroup_free(struct cgroup *cgrp); | ||
| 27 | void cgroup_move_task(struct task_struct *p, struct css_set *to); | ||
| 28 | #endif | ||
| 29 | |||
| 19 | #else /* CONFIG_PSI */ | 30 | #else /* CONFIG_PSI */ |
| 20 | 31 | ||
| 21 | static inline void psi_init(void) {} | 32 | static inline void psi_init(void) {} |
| @@ -23,6 +34,20 @@ static inline void psi_init(void) {} | |||
| 23 | static inline void psi_memstall_enter(unsigned long *flags) {} | 34 | static inline void psi_memstall_enter(unsigned long *flags) {} |
| 24 | static inline void psi_memstall_leave(unsigned long *flags) {} | 35 | static inline void psi_memstall_leave(unsigned long *flags) {} |
| 25 | 36 | ||
| 37 | #ifdef CONFIG_CGROUPS | ||
| 38 | static inline int psi_cgroup_alloc(struct cgroup *cgrp) | ||
| 39 | { | ||
| 40 | return 0; | ||
| 41 | } | ||
| 42 | static inline void psi_cgroup_free(struct cgroup *cgrp) | ||
| 43 | { | ||
| 44 | } | ||
| 45 | static inline void cgroup_move_task(struct task_struct *p, struct css_set *to) | ||
| 46 | { | ||
| 47 | rcu_assign_pointer(p->cgroups, to); | ||
| 48 | } | ||
| 49 | #endif | ||
| 50 | |||
| 26 | #endif /* CONFIG_PSI */ | 51 | #endif /* CONFIG_PSI */ |
| 27 | 52 | ||
| 28 | #endif /* _LINUX_PSI_H */ | 53 | #endif /* _LINUX_PSI_H */ |
