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

Commit 4f34d48a authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched/walt: Improve the scheduler"

parents e6e7d42d b9173741
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 {
+17 −1
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ static void release_rq_locks_irqrestore(const cpumask_t *cpus,

#define NR_WINDOWS_PER_SEC (NSEC_PER_SEC / MIN_SCHED_RAVG_WINDOW)

__read_mostly unsigned int sysctl_sched_cpu_high_irqload = (10 * NSEC_PER_MSEC);
__read_mostly unsigned int sysctl_sched_cpu_high_irqload = TICK_NSEC;

unsigned int sysctl_sched_walt_rotate_big_tasks;
unsigned int walt_rotation_enabled;
@@ -3690,3 +3690,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);