3965f10a4a
If CONFIG_SCHED_TUNE is enabled, it does not use boosted cpu util to compute energy, so it could not reflect the real freq when a cpu has boosted tasks on it. Addressing it by adding boost margin if type is FREQUENCY_UTIL in schedutil_cpu_util(). Bug: 158637636 Signed-off-by: Rick Yiu <rickyiu@google.com> Change-Id: I570920cb1e67d07de87006fca058d50e9358b7cd
33 lines
807 B
C
33 lines
807 B
C
|
|
#ifdef CONFIG_SCHED_TUNE
|
|
|
|
#include <linux/reciprocal_div.h>
|
|
|
|
/*
|
|
* System energy normalization constants
|
|
*/
|
|
struct target_nrg {
|
|
unsigned long min_power;
|
|
unsigned long max_power;
|
|
struct reciprocal_value rdiv;
|
|
};
|
|
|
|
int schedtune_cpu_boost_with(int cpu, struct task_struct *p);
|
|
int schedtune_task_boost(struct task_struct *tsk);
|
|
|
|
int schedtune_prefer_idle(struct task_struct *tsk);
|
|
|
|
void schedtune_enqueue_task(struct task_struct *p, int cpu);
|
|
void schedtune_dequeue_task(struct task_struct *p, int cpu);
|
|
|
|
#else /* CONFIG_SCHED_TUNE */
|
|
|
|
#define schedtune_cpu_boost_with(cpu, p) 0
|
|
#define schedtune_task_boost(tsk) 0
|
|
|
|
#define schedtune_prefer_idle(tsk) 0
|
|
|
|
#define schedtune_enqueue_task(task, cpu) do { } while (0)
|
|
#define schedtune_dequeue_task(task, cpu) do { } while (0)
|
|
|
|
#endif /* CONFIG_SCHED_TUNE */
|