Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9173741 authored by Sai Harshini Nimmala's avatar Sai Harshini Nimmala
Browse files

sched/walt: Improve the scheduler



This change is for general scheduler improvement.

Change-Id: If4e1dfbdb1f71989a75d33c8fa995ba0397b3ba9
Signed-off-by: default avatarSai Harshini Nimmala <snimmala@codeaurora.org>
parent 30a20ea7
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -120,6 +120,18 @@ enum task_boost_type {
	TASK_BOOST_END,
};

/*
 * Enum for display driver to provide varying refresh rates
 */
enum fps {
	FPS0 = 0,
	FPS30 = 30,
	FPS48 = 48,
	FPS60 = 60,
	FPS90 = 90,
	FPS120 = 120,
};

#ifdef CONFIG_DEBUG_ATOMIC_SLEEP

/*
@@ -557,6 +569,7 @@ extern void sched_update_cpu_freq_min_max(const cpumask_t *cpus, u32 fmin,
					  u32 fmax);
extern int sched_set_boost(int enable);
extern void free_task_load_ptrs(struct task_struct *p);
extern void sched_set_refresh_rate(enum fps fps);

#define RAVG_HIST_SIZE_MAX 5
#define NUM_BUSY_BUCKETS 10
@@ -626,6 +639,8 @@ static inline void free_task_load_ptrs(struct task_struct *p) { }

static inline void sched_update_cpu_freq_min_max(const cpumask_t *cpus,
					u32 fmin, u32 fmax) { }

static inline void sched_set_refresh_rate(enum fps fps) { }
#endif /* CONFIG_SCHED_WALT */

struct sched_rt_entity {
+16 −0
Original line number Diff line number Diff line
@@ -3689,3 +3689,19 @@ int sched_ravg_window_handler(struct ctl_table *table,
	mutex_unlock(&mutex);
	return ret;
}

void sched_set_refresh_rate(enum fps fps)
{
	int new_nr_ticks;

	if (HZ == 250) {
		if (fps > FPS90)
			new_nr_ticks = 2;
		else if (fps == FPS90)
			new_nr_ticks = 3;
		else
			new_nr_ticks = 5;
		sched_window_nr_ticks_change(new_nr_ticks);
	}
}
EXPORT_SYMBOL(sched_set_refresh_rate);