psi.h 629 B

12345678910111213141516171819202122232425262728
  1. #ifndef _LINUX_PSI_H
  2. #define _LINUX_PSI_H
  3. #include <linux/psi_types.h>
  4. #include <linux/sched.h>
  5. #ifdef CONFIG_PSI
  6. extern bool psi_disabled;
  7. void psi_init(void);
  8. void psi_task_change(struct task_struct *task, int clear, int set);
  9. void psi_memstall_tick(struct task_struct *task, int cpu);
  10. void psi_memstall_enter(unsigned long *flags);
  11. void psi_memstall_leave(unsigned long *flags);
  12. #else /* CONFIG_PSI */
  13. static inline void psi_init(void) {}
  14. static inline void psi_memstall_enter(unsigned long *flags) {}
  15. static inline void psi_memstall_leave(unsigned long *flags) {}
  16. #endif /* CONFIG_PSI */
  17. #endif /* _LINUX_PSI_H */