Large diffs are not rendered by default.

@@ -1425,7 +1425,7 @@ static inline void update_cfs_rq_blocked_load(struct cfs_rq *cfs_rq,
int force_update) {}
#endif

#if defined(CONFIG_SCHED_FREQ_INPUT) || defined(CONFIG_SCHED_HMP)
#ifdef CONFIG_SCHED_FREQ_INPUT

static inline unsigned int task_load(struct task_struct *p)
{
@@ -1460,7 +1460,7 @@ void init_new_task_load(struct task_struct *p)
p->ravg.sum_history[i] = 0;
}

#endif /* CONFIG_SCHED_FREQ_INPUT || CONFIG_SCHED_HMP */
#endif /* CONFIG_SCHED_FREQ_INPUT */

static void enqueue_sleeper(struct cfs_rq *cfs_rq, struct sched_entity *se)
{
@@ -4126,7 +4126,7 @@ static inline int get_sd_load_idx(struct sched_domain *sd,

static unsigned long default_scale_freq_power(struct sched_domain *sd, int cpu)
{
return capacity_scale_cpu_freq(cpu);
return SCHED_POWER_SCALE;
}

unsigned long __weak arch_scale_freq_power(struct sched_domain *sd, int cpu)
@@ -4195,9 +4195,6 @@ static void update_cpu_power(struct sched_domain *sd, int cpu)

sdg->sgp->power_orig = power;

power *= capacity_scale_cpu_efficiency(cpu);
power >>= SCHED_POWER_SHIFT;

if (Larch_power)
power *= arch_scale_freq_power(sd, cpu);
else
@@ -34,7 +34,7 @@ SCHED_FEAT(CACHE_HOT_BUDDY, true)
/*
* Use arch dependent cpu power functions
*/
SCHED_FEAT(ARCH_POWER, true)
SCHED_FEAT(ARCH_POWER, false)

SCHED_FEAT(HRTICK, false)
SCHED_FEAT(DOUBLE_TICK, false)
@@ -72,14 +72,11 @@ extern __read_mostly int scheduler_running;
*/
#define RUNTIME_INF ((u64)~0ULL)

static inline int fair_policy(int policy)
{
return policy == SCHED_NORMAL || policy == SCHED_BATCH;
}

static inline int rt_policy(int policy)
{
return policy == SCHED_FIFO || policy == SCHED_RR;
if (policy == SCHED_FIFO || policy == SCHED_RR)
return 1;
return 0;
}

static inline int task_has_rt_policy(struct task_struct *p)
@@ -483,16 +480,13 @@ struct rq {
u64 max_idle_balance_cost;
#endif

#if defined(CONFIG_SCHED_FREQ_INPUT) || defined(CONFIG_SCHED_HMP)
#ifdef CONFIG_SCHED_FREQ_INPUT
/*
* max_freq = user or thermal defined maximum
* max_possible_freq = maximum supported by hardware
*/
unsigned int cur_freq, max_freq, min_freq, max_possible_freq;
u64 cumulative_runnable_avg;
int efficiency; /* Differentiate cpus with different IPC capability */
int load_scale_factor;
int capacity;
#endif

#ifdef CONFIG_IRQ_TIME_ACCOUNTING
@@ -631,19 +625,13 @@ DECLARE_PER_CPU(int, sd_llc_id);
#include "stats.h"
#include "auto_group.h"

#if defined(CONFIG_SCHED_FREQ_INPUT) || defined(CONFIG_SCHED_HMP)
#ifdef CONFIG_SCHED_FREQ_INPUT

extern unsigned int sched_ravg_window;
extern unsigned int max_possible_freq;
extern unsigned int min_max_freq;
extern unsigned int pct_task_load(struct task_struct *p);
extern void init_new_task_load(struct task_struct *p);
extern unsigned int max_possible_efficiency;
extern unsigned int min_possible_efficiency;
extern unsigned int max_capacity;
extern unsigned int min_capacity;
extern unsigned long capacity_scale_cpu_efficiency(int cpu);
extern unsigned long capacity_scale_cpu_freq(int cpu);

static inline void
inc_cumulative_runnable_avg(struct rq *rq, struct task_struct *p)
@@ -658,7 +646,7 @@ dec_cumulative_runnable_avg(struct rq *rq, struct task_struct *p)
BUG_ON((s64)rq->cumulative_runnable_avg < 0);
}

#else /* CONFIG_SCHED_FREQ_INPUT || CONFIG_SCHED_HMP */
#else /* CONFIG_SCHED_FREQ_INPUT */

static inline int pct_task_load(struct task_struct *p) { return 0; }

@@ -674,17 +662,7 @@ dec_cumulative_runnable_avg(struct rq *rq, struct task_struct *p)

static inline void init_new_task_load(struct task_struct *p) { }

static inline unsigned long capacity_scale_cpu_efficiency(int cpu)
{
return SCHED_LOAD_SCALE;
}

static inline unsigned long capacity_scale_cpu_freq(int cpu)
{
return SCHED_LOAD_SCALE;
}

#endif /* CONFIG_SCHED_FREQ_INPUT || CONFIG_SCHED_HMP */
#endif /* CONFIG_SCHED_FREQ_INPUT */

#ifdef CONFIG_CGROUP_SCHED

@@ -281,7 +281,7 @@ static struct ctl_table kern_table[] = {
.mode = 0644,
.proc_handler = proc_dointvec,
},
#if defined(CONFIG_SCHED_FREQ_INPUT) || defined(CONFIG_SCHED_HMP)
#ifdef CONFIG_SCHED_FREQ_INPUT
{
.procname = "sched_window_stats_policy",
.data = &sysctl_sched_window_stats_policy,