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

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

Merge "sched: walt: Improve the Scheduler"

parents 5ab3549e bc8c7881
Loading
Loading
Loading
Loading
+2 −33
Original line number Diff line number Diff line
@@ -6979,6 +6979,8 @@ void __init sched_init(void)

	init_uclamp();

	walt_init_sched_boost(&root_task_group);

	scheduler_running = 1;
}

@@ -7185,38 +7187,6 @@ static inline struct task_group *css_tg(struct cgroup_subsys_state *css)
}

#if defined(CONFIG_SCHED_WALT) && defined(CONFIG_UCLAMP_TASK_GROUP)
static inline void walt_init_sched_boost(struct task_group *tg)
{
	tg->sched_boost_no_override = false;
	tg->sched_boost_enabled = true;
	tg->colocate = false;
	tg->colocate_update_disabled = false;
}

void update_cgroup_boost_settings(void)
{
	struct task_group *tg;

	rcu_read_lock();
	list_for_each_entry_rcu(tg, &task_groups, list) {
		if (tg->sched_boost_no_override)
			continue;

		tg->sched_boost_enabled = false;
	}
	rcu_read_unlock();
}

void restore_cgroup_boost_settings(void)
{
	struct task_group *tg;

	rcu_read_lock();
	list_for_each_entry_rcu(tg, &task_groups, list)
		tg->sched_boost_enabled = true;
	rcu_read_unlock();
}

static void walt_schedgp_attach(struct cgroup_taskset *tset)
{
	struct task_struct *task;
@@ -7272,7 +7242,6 @@ static int sched_colocate_write(struct cgroup_subsys_state *css,
	return 0;
}
#else
static inline void walt_init_sched_boost(struct task_group *tg) { }
static void walt_schedgp_attach(struct cgroup_taskset *tset) { }
#endif /* CONFIG_SCHED_WALT */

+6 −4
Original line number Diff line number Diff line
@@ -3051,8 +3051,6 @@ static inline bool task_sched_boost(struct task_struct *p)
}

extern int sync_cgroup_colocation(struct task_struct *p, bool insert);
extern void update_cgroup_boost_settings(void);
extern void restore_cgroup_boost_settings(void);
#else
static inline bool
same_schedtg(struct task_struct *tsk1, struct task_struct *tsk2)
@@ -3065,8 +3063,6 @@ static inline bool task_sched_boost(struct task_struct *p)
	return true;
}

static inline void update_cgroup_boost_settings(void) { }
static inline void restore_cgroup_boost_settings(void) { }
#endif

extern int alloc_related_thread_groups(void);
@@ -3363,3 +3359,9 @@ extern struct task_struct *find_process_by_pid(pid_t pid);

extern void enqueue_task_core(struct rq *rq, struct task_struct *p, int flags);
extern void dequeue_task_core(struct rq *rq, struct task_struct *p, int flags);

#if defined(CONFIG_SCHED_WALT) && defined(CONFIG_UCLAMP_TASK_GROUP)
extern void walt_init_sched_boost(struct task_group *tg);
#else
static inline void walt_init_sched_boost(struct task_group *tg) {}
#endif
+5 −0
Original line number Diff line number Diff line
@@ -216,4 +216,9 @@ void __weak update_cluster_topology(void) { }
void __weak init_clusters(void) { }

void __weak walt_sched_init_rq(struct rq *rq) { }

void __weak walt_update_cluster_topology(void) { }

#if defined(CONFIG_UCLAMP_TASK_GROUP)
void __weak walt_init_sched_boost(struct task_group *tg) { }
#endif