aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/psi.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/psi.h')
-rw-r--r--include/linux/psi.h25
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
7struct seq_file;
8struct css_set;
9
7#ifdef CONFIG_PSI 10#ifdef CONFIG_PSI
8 11
9extern bool psi_disabled; 12extern bool psi_disabled;
@@ -16,6 +19,14 @@ void psi_memstall_tick(struct task_struct *task, int cpu);
16void psi_memstall_enter(unsigned long *flags); 19void psi_memstall_enter(unsigned long *flags);
17void psi_memstall_leave(unsigned long *flags); 20void psi_memstall_leave(unsigned long *flags);
18 21
22int psi_show(struct seq_file *s, struct psi_group *group, enum psi_res res);
23
24#ifdef CONFIG_CGROUPS
25int psi_cgroup_alloc(struct cgroup *cgrp);
26void psi_cgroup_free(struct cgroup *cgrp);
27void cgroup_move_task(struct task_struct *p, struct css_set *to);
28#endif
29
19#else /* CONFIG_PSI */ 30#else /* CONFIG_PSI */
20 31
21static inline void psi_init(void) {} 32static inline void psi_init(void) {}
@@ -23,6 +34,20 @@ static inline void psi_init(void) {}
23static inline void psi_memstall_enter(unsigned long *flags) {} 34static inline void psi_memstall_enter(unsigned long *flags) {}
24static inline void psi_memstall_leave(unsigned long *flags) {} 35static inline void psi_memstall_leave(unsigned long *flags) {}
25 36
37#ifdef CONFIG_CGROUPS
38static inline int psi_cgroup_alloc(struct cgroup *cgrp)
39{
40 return 0;
41}
42static inline void psi_cgroup_free(struct cgroup *cgrp)
43{
44}
45static 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 */