4 #include <linux/psi_types.h>
5 #include <linux/sched.h>
12 extern bool psi_disabled;
16 void psi_task_change(struct task_struct *task, int clear, int set);
18 void psi_memstall_tick(struct task_struct *task, int cpu);
19 void psi_memstall_enter(unsigned long *flags);
20 void psi_memstall_leave(unsigned long *flags);
22 int psi_show(struct seq_file *s, struct psi_group *group, enum psi_res res);
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);
30 #else /* CONFIG_PSI */
32 static inline void psi_init(void) {}
34 static inline void psi_memstall_enter(unsigned long *flags) {}
35 static inline void psi_memstall_leave(unsigned long *flags) {}
38 static inline int psi_cgroup_alloc(struct cgroup *cgrp)
42 static inline void psi_cgroup_free(struct cgroup *cgrp)
45 static inline void cgroup_move_task(struct task_struct *p, struct css_set *to)
47 rcu_assign_pointer(p->cgroups, to);
51 #endif /* CONFIG_PSI */
53 #endif /* _LINUX_PSI_H */