sched/walt: Improve the scheduler

This change is for general scheduler improvements.

Change-Id: Ica36bb6ccd4c2d8897dab62614eadb5a060d5390
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This commit is contained in:
Pavankumar Kondeti 2020-05-28 11:46:29 +05:30 • committed by Gerrit - the friendly Code Review server
commit 961c3a5fc3
2 changed files with 12 additions and 1 deletions

View file

@ -2489,7 +2489,8 @@ static void ttwu_queue(struct task_struct *p, int cpu, int wake_flags)
struct rq_flags rf;
#if defined(CONFIG_SMP)
if (sched_feat(TTWU_QUEUE) && !cpus_share_cache(smp_processor_id(), cpu)) {
if ((sched_feat(TTWU_QUEUE) && !cpus_share_cache(smp_processor_id(), cpu)) ||
walt_want_remote_wakeup()) {
sched_clock_cpu(cpu); /* Sync clocks across CPUs */
ttwu_queue_remote(p, cpu, wake_flags);
return;

View file

@ -2859,6 +2859,12 @@ enum sched_boost_policy {
#ifdef CONFIG_SCHED_WALT
#define WALT_MANY_WAKEUP_DEFAULT 1000
static inline bool walt_want_remote_wakeup(void)
{
return sysctl_sched_many_wakeup_threshold < WALT_MANY_WAKEUP_DEFAULT;
}
static inline int cluster_first_cpu(struct walt_sched_cluster *cluster)
{
return cpumask_first(&cluster->cpus);
@ -3268,6 +3274,10 @@ static inline bool early_detection_notify(struct rq *rq, u64 wallclock)
}
static inline void note_task_waking(struct task_struct *p, u64 wallclock) { }
static inline bool walt_want_remote_wakeup(void)
{
return false;
}
#endif /* CONFIG_SCHED_WALT */
struct sched_avg_stats {