4 #include <linux/jump_label.h>
5 #include <linux/psi_types.h>
6 #include <linux/sched.h>
7 #include <linux/poll.h>
14 extern struct static_key_false psi_disabled;
15 extern struct psi_group psi_system;
19 void psi_task_change(struct task_struct *task, int clear, int set);
20 void psi_task_switch(struct task_struct *prev, struct task_struct *next,
23 void psi_memstall_enter(unsigned long *flags);
24 void psi_memstall_leave(unsigned long *flags);
26 int psi_show(struct seq_file *s, struct psi_group *group, enum psi_res res);
29 int psi_cgroup_alloc(struct cgroup *cgrp);
30 void psi_cgroup_free(struct cgroup *cgrp);
31 void cgroup_move_task(struct task_struct *p, struct css_set *to);
33 struct psi_trigger *psi_trigger_create(struct psi_group *group,
34 char *buf, size_t nbytes, enum psi_res res);
35 void psi_trigger_replace(void **trigger_ptr, struct psi_trigger *t);
37 __poll_t psi_trigger_poll(void **trigger_ptr, struct file *file,
41 #else /* CONFIG_PSI */
43 static inline void psi_init(void) {}
45 static inline void psi_memstall_enter(unsigned long *flags) {}
46 static inline void psi_memstall_leave(unsigned long *flags) {}
49 static inline int psi_cgroup_alloc(struct cgroup *cgrp)
53 static inline void psi_cgroup_free(struct cgroup *cgrp)
56 static inline void cgroup_move_task(struct task_struct *p, struct css_set *to)
58 rcu_assign_pointer(p->cgroups, to);
62 #endif /* CONFIG_PSI */
64 #endif /* _LINUX_PSI_H */