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

Commit 8cd9db48 authored by Puja Gupta's avatar Puja Gupta
Browse files

sched: improve the scheduler



This change is for general scheduler improvement.

CRs-Fixed: 2110273
Change-Id: Icdaa19125c0351426d5545393dad776690b75b76
Signed-off-by: default avatarPuja Gupta <pujag@codeaurora.org>
parent 2f80a4ec
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3960,6 +3960,7 @@ static inline unsigned long rlimit_max(unsigned int limit)
#define SCHED_CPUFREQ_INTERCLUSTER_MIG (1U << 3)
#define SCHED_CPUFREQ_WALT (1U << 4)
#define SCHED_CPUFREQ_PL	(1U << 5)
#define SCHED_CPUFREQ_EARLY_DET	(1U << 6)

#define SCHED_CPUFREQ_RT_DL	(SCHED_CPUFREQ_RT | SCHED_CPUFREQ_DL)

+4 −1
Original line number Diff line number Diff line
@@ -3305,6 +3305,7 @@ void scheduler_tick(void)
	bool early_notif;
	u32 old_load;
	struct related_thread_group *grp;
	unsigned int flag = 0;

	sched_clock_tick();

@@ -3321,10 +3322,12 @@ void scheduler_tick(void)
	cpu_load_update_active(rq);
	calc_global_load_tick(rq);
	sched_freq_tick(cpu);
	cpufreq_update_util(rq, 0);

	early_notif = early_detection_notify(rq, wallclock);
	if (early_notif)
		flag = SCHED_CPUFREQ_WALT | SCHED_CPUFREQ_EARLY_DET;

	cpufreq_update_util(rq, flag);
	raw_spin_unlock(&rq->lock);

	if (early_notif)
+1 −1
Original line number Diff line number Diff line
@@ -2291,7 +2291,7 @@ static inline void cpufreq_update_util(struct rq *rq, unsigned int flags)

#ifdef CONFIG_SCHED_WALT
	unsigned int exception_flags = SCHED_CPUFREQ_INTERCLUSTER_MIG |
						SCHED_CPUFREQ_PL;
				SCHED_CPUFREQ_PL | SCHED_CPUFREQ_EARLY_DET;

	/*
	 * Skip if we've already reported, but not if this is an inter-cluster