tune.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifdef CONFIG_SCHED_TUNE
  2. #include <linux/reciprocal_div.h>
  3. /*
  4. * System energy normalization constants
  5. */
  6. struct target_nrg {
  7. unsigned long min_power;
  8. unsigned long max_power;
  9. struct reciprocal_value rdiv;
  10. };
  11. int schedtune_cpu_boost(int cpu);
  12. int schedtune_task_boost(struct task_struct *tsk);
  13. int schedtune_prefer_idle(struct task_struct *tsk);
  14. void schedtune_enqueue_task(struct task_struct *p, int cpu);
  15. void schedtune_dequeue_task(struct task_struct *p, int cpu);
  16. extern int stune_task_threshold;
  17. #ifdef CONFIG_UCLAMP_TASK_GROUP
  18. extern struct mutex uclamp_mutex;
  19. extern int opp_capacity_tbl_ready;
  20. extern void init_opp_capacity_tbl(void);
  21. extern unsigned int find_fit_capacity(unsigned int cap);
  22. extern void uclamp_group_get(struct task_struct *p,
  23. struct cgroup_subsys_state *css,
  24. struct uclamp_se *uc_se,
  25. unsigned int clamp_id, unsigned int clamp_value);
  26. extern void uclamp_group_put(unsigned int clamp_id, unsigned int group_id);
  27. #endif
  28. #else /* CONFIG_SCHED_TUNE */
  29. #define schedtune_cpu_boost(cpu) 0
  30. #define schedtune_task_boost(tsk) 0
  31. #define schedtune_prefer_idle(tsk) 0
  32. #define schedtune_enqueue_task(task, cpu) do { } while (0)
  33. #define schedtune_dequeue_task(task, cpu) do { } while (0)
  34. #define stune_task_threshold 0
  35. #endif /* CONFIG_SCHED_TUNE */