2015-07-07 15:33:20 +01:00
|
|
|
|
|
|
|
#ifdef CONFIG_SCHED_TUNE
|
|
|
|
|
2016-07-29 15:45:57 +01:00
|
|
|
#include <linux/reciprocal_div.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
* System energy normalization constants
|
|
|
|
*/
|
|
|
|
struct target_nrg {
|
|
|
|
unsigned long min_power;
|
|
|
|
unsigned long max_power;
|
|
|
|
struct reciprocal_value rdiv;
|
|
|
|
};
|
|
|
|
|
2015-07-07 15:33:20 +01:00
|
|
|
#ifdef CONFIG_CGROUP_SCHEDTUNE
|
|
|
|
|
|
|
|
int schedtune_cpu_boost(int cpu);
|
sched/fair: add boosted task utilization
The task utilization signal, which is derived from PELT signals and
properly scaled to be architecture and frequency invariant, is used by
EAS as an estimation of the task requirements in terms of CPU bandwidth.
When the energy aware scheduler is in use, this signal affects the CPU
selection. Thus, a convenient way to bias that decision, which is also
little intrusive, is to boost the task utilization signal each time it
is required to support them.
This patch introduces the new function:
boosted_task_util(task)
which returns a boosted value for the utilization of the specified task.
The margin added to the original utilization is:
1. computed based on the "boosting strategy" in use
2. proportional to boost value defined either by the sysctl interface,
when global boosting is in use, or the "taskgroup" value, when
per-task boosting is enabled.
The boosted signal is used by EAS
a. transparently, via its integration into the task_fits() function
b. explicitly, in the energy-aware wakeup path
Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2016-01-14 18:31:53 +00:00
|
|
|
int schedtune_task_boost(struct task_struct *tsk);
|
2015-07-07 15:33:20 +01:00
|
|
|
|
|
|
|
void schedtune_enqueue_task(struct task_struct *p, int cpu);
|
|
|
|
void schedtune_dequeue_task(struct task_struct *p, int cpu);
|
|
|
|
|
|
|
|
#else /* CONFIG_CGROUP_SCHEDTUNE */
|
|
|
|
|
|
|
|
#define schedtune_enqueue_task(task, cpu) do { } while (0)
|
|
|
|
#define schedtune_dequeue_task(task, cpu) do { } while (0)
|
|
|
|
|
|
|
|
#endif /* CONFIG_CGROUP_SCHEDTUNE */
|
|
|
|
|
2016-01-12 18:12:13 +00:00
|
|
|
int schedtune_normalize_energy(int energy);
|
|
|
|
int schedtune_accept_deltas(int nrg_delta, int cap_delta,
|
|
|
|
struct task_struct *task);
|
|
|
|
|
2015-07-07 15:33:20 +01:00
|
|
|
#else /* CONFIG_SCHED_TUNE */
|
|
|
|
|
|
|
|
#define schedtune_enqueue_task(task, cpu) do { } while (0)
|
|
|
|
#define schedtune_dequeue_task(task, cpu) do { } while (0)
|
|
|
|
|
2016-01-12 18:12:13 +00:00
|
|
|
#define schedtune_accept_deltas(nrg_delta, cap_delta, task) nrg_delta
|
|
|
|
|
2015-07-07 15:33:20 +01:00
|
|
|
#endif /* CONFIG_SCHED_TUNE */
|