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

Commit b4229d73 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched: Make RT tasks eligible for boost"

parents 9e34b2c8 fce95c9a
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
@@ -1517,7 +1517,7 @@ static void boost_kick_cpus(void)
	}
}

static inline int sched_boost(void)
int sched_boost(void)
{
	return boost_refcount > 0;
}
@@ -2307,11 +2307,6 @@ void check_for_migration(struct rq *rq, struct task_struct *p)
					&rq->active_balance_work);
}

static inline int capacity(struct rq *rq)
{
	return rq->capacity;
}

static inline int nr_big_tasks(struct rq *rq)
{
	return rq->nr_big_tasks;
@@ -2372,11 +2367,6 @@ static inline int nr_big_tasks(struct rq *rq)
	return 0;
}

static inline int capacity(struct rq *rq)
{
	return SCHED_LOAD_SCALE;
}

#endif	/* CONFIG_SCHED_HMP */

#ifdef CONFIG_SCHED_HMP
+4 −0
Original line number Diff line number Diff line
@@ -1547,6 +1547,10 @@ static int find_lowest_rq_hmp(struct task_struct *task)
		cpu_cost = power_cost_at_freq(i, ACCESS_ONCE(rq->min_freq));
		trace_sched_cpu_load(rq, idle_cpu(i),
				     mostly_idle_cpu(i), cpu_cost);

		if (sched_boost() && capacity(rq) != max_capacity)
			continue;

		if (cpu_cost < min_cost) {
			min_cost = cpu_cost;
			best_cpu = i;
+11 −0
Original line number Diff line number Diff line
@@ -731,6 +731,11 @@ unsigned int max_task_load(void);
extern void sched_account_irqtime(int cpu, struct task_struct *curr,
				 u64 delta, u64 wallclock);

static inline int capacity(struct rq *rq)
{
	return rq->capacity;
}

static inline void
inc_cumulative_runnable_avg(struct rq *rq, struct task_struct *p)
{
@@ -762,6 +767,11 @@ dec_cumulative_runnable_avg(struct rq *rq, struct task_struct *p)

static inline int pct_task_load(struct task_struct *p) { return 0; }

static inline int capacity(struct rq *rq)
{
	return SCHED_LOAD_SCALE;
}

static inline void
inc_cumulative_runnable_avg(struct rq *rq, struct task_struct *p)
{
@@ -856,6 +866,7 @@ extern void set_hmp_defaults(void);
extern unsigned int power_cost_at_freq(int cpu, unsigned int freq);
extern void reset_all_window_stats(u64 window_start, unsigned int window_size);
extern void boost_kick(int cpu);
extern int sched_boost(void);

#else /* CONFIG_SCHED_HMP */