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

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

Merge "sched/boost: provide helper api for boost on big"

parents 794ab2fb acc14a6d
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -7000,9 +7000,7 @@ static inline bool task_fits_max(struct task_struct *p, int cpu)
	if (capacity == max_capacity)
		return true;

	if (sched_boost_policy() == SCHED_BOOST_ON_BIG &&
					task_sched_boost(p) &&
					is_min_capacity_cpu(cpu))
	if (task_boost_on_big_eligible(p) && is_min_capacity_cpu(cpu))
		return false;

	return task_fits_capacity(p, capacity, cpu);
+13 −0
Original line number Diff line number Diff line
@@ -2901,6 +2901,14 @@ static inline bool task_placement_boost_enabled(struct task_struct *p)
	return false;
}

static inline bool task_boost_on_big_eligible(struct task_struct *p)
{
	bool boost_on_big = task_sched_boost(p) &&
				sched_boost_policy() == SCHED_BOOST_ON_BIG;

	return boost_on_big;
}

#else	/* CONFIG_SCHED_WALT */

struct walt_sched_stats;
@@ -2917,6 +2925,11 @@ static inline bool task_placement_boost_enabled(struct task_struct *p)
	return false;
}

static inline bool task_boost_on_big_eligible(struct task_struct *p)
{
	return false;
}

static inline void check_for_migration(struct rq *rq, struct task_struct *p) { }

static inline int sched_boost(void)
+1 −3
Original line number Diff line number Diff line
@@ -2529,7 +2529,6 @@ static void _set_preferred_cluster(struct related_thread_group *grp)
{
	struct task_struct *p;
	u64 combined_demand = 0;
	bool boost_on_big = sched_boost_policy() == SCHED_BOOST_ON_BIG;
	bool group_boost = false;
	u64 wallclock;

@@ -2548,7 +2547,7 @@ static void _set_preferred_cluster(struct related_thread_group *grp)
		return;

	list_for_each_entry(p, &grp->tasks, grp_list) {
		if (boost_on_big && task_sched_boost(p)) {
		if (task_boost_on_big_eligible(p)) {
			group_boost = true;
			break;
		}
@@ -2558,7 +2557,6 @@ static void _set_preferred_cluster(struct related_thread_group *grp)
			continue;

		combined_demand += p->ravg.coloc_demand;

	}

	grp->preferred_cluster = best_cluster(grp,