sched/walt: sched: Improve the scheduler

This change is for general scheduler improvemnts.

Change-Id: If28d00691bc42b62cc4fc96a49d601c7ac5e3e34
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This commit is contained in:
Pavankumar Kondeti 2021-02-10 15:19:05 +05:30
parent db5f5ed622
commit 40119a104b
4 changed files with 18 additions and 5 deletions

View File

@ -1328,7 +1328,7 @@ static int cluster_init(const struct cpumask *mask)
return kobject_add(&cluster->kobj, &dev->kobj, "core_ctl"); return kobject_add(&cluster->kobj, &dev->kobj, "core_ctl");
} }
static int __init core_ctl_init(void) int core_ctl_init(void)
{ {
struct walt_sched_cluster *cluster; struct walt_sched_cluster *cluster;
int ret; int ret;
@ -1350,5 +1350,3 @@ static int __init core_ctl_init(void)
initialized = true; initialized = true;
return 0; return 0;
} }
late_initcall(core_ctl_init);

View File

@ -330,7 +330,7 @@ static struct input_handler cpuboost_input_handler = {
}; };
struct kobject *cpu_boost_kobj; struct kobject *cpu_boost_kobj;
static int cpu_boost_init(void) int cpu_boost_init(void)
{ {
int cpu, ret; int cpu, ret;
struct cpu_sync *s; struct cpu_sync *s;
@ -386,4 +386,3 @@ static int cpu_boost_init(void)
ret = input_register_handler(&cpuboost_input_handler); ret = input_register_handler(&cpuboost_input_handler);
return 0; return 0;
} }
late_initcall(cpu_boost_init);

View File

@ -2550,6 +2550,13 @@ static void walt_get_possible_siblings(int cpuid, struct cpumask *cluster_cpus)
} }
} }
static void walt_rest_init(struct work_struct *work)
{
core_ctl_init();
cpu_boost_init();
}
static DECLARE_WORK(walt_work, walt_rest_init);
void walt_update_cluster_topology(void) void walt_update_cluster_topology(void)
{ {
struct cpumask cpus = *cpu_possible_mask; struct cpumask cpus = *cpu_possible_mask;
@ -2617,6 +2624,7 @@ void walt_update_cluster_topology(void)
} }
smp_store_release(&cpu_array, tmp); smp_store_release(&cpu_array, tmp);
walt_clusters_parsed = true; walt_clusters_parsed = true;
schedule_work(&walt_work);
} }
static int cpufreq_notifier_trans(struct notifier_block *nb, static int cpufreq_notifier_trans(struct notifier_block *nb,

View File

@ -204,6 +204,14 @@ static inline unsigned int walt_nr_rtg_high_prio(int cpu)
return cpu_rq(cpu)->wrq.walt_stats.nr_rtg_high_prio_tasks; return cpu_rq(cpu)->wrq.walt_stats.nr_rtg_high_prio_tasks;
} }
extern int core_ctl_init(void);
#ifdef CONFIG_CPU_FREQ
extern int cpu_boost_init(void);
#else
static inline int cpu_boost_init(void) { }
#endif
#else /* CONFIG_SCHED_WALT */ #else /* CONFIG_SCHED_WALT */
static inline void walt_sched_init_rq(struct rq *rq) { } static inline void walt_sched_init_rq(struct rq *rq) { }