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

Commit fe6101d4 authored by Abhijeet Dharmapurikar's avatar Abhijeet Dharmapurikar Committed by Pavankumar Kondeti
Browse files

sched/tune: remove disabling sched_boost per cgroup



The current code support enabling/disabling sched boost per cgroup. This
is not used. Remove it. This also makes it unnecessary to track the
backup of enabled, remove it too.

Change-Id: I1af1bc9116a21e8921742a8aac6e9b8568e4de3c
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent 64d9f429
Loading
Loading
Loading
Loading
+1 −34
Original line number Diff line number Diff line
@@ -43,12 +43,6 @@ struct schedtune {
	 */
	bool sched_boost_enabled;

	/*
	 * This tracks the default value of sched_boost_enabled and is used
	 * restore the value following any temporary changes to that flag.
	 */
	bool sched_boost_enabled_backup;

	/*
	 * Controls whether tasks of this cgroup should be colocated with each
	 * other and tasks of other cgroups that have the same flag turned on.
@@ -94,7 +88,6 @@ root_schedtune = {
#ifdef CONFIG_SCHED_WALT
	.sched_boost_no_override = false,
	.sched_boost_enabled = true,
	.sched_boost_enabled_backup = true,
	.colocate = false,
	.colocate_update_disabled = false,
#endif
@@ -153,7 +146,6 @@ static inline void init_sched_boost(struct schedtune *st)
{
	st->sched_boost_no_override = false;
	st->sched_boost_enabled = true;
	st->sched_boost_enabled_backup = st->sched_boost_enabled;
	st->colocate = false;
	st->colocate_update_disabled = false;
}
@@ -186,8 +178,7 @@ void restore_cgroup_boost_settings(void)
		if (!allocated_group[i])
			break;

		allocated_group[i]->sched_boost_enabled =
			allocated_group[i]->sched_boost_enabled_backup;
		allocated_group[i]->sched_boost_enabled = true;
	}
}

@@ -461,25 +452,6 @@ int schedtune_can_attach(struct cgroup_taskset *tset)
}

#ifdef CONFIG_SCHED_WALT
static u64 sched_boost_enabled_read(struct cgroup_subsys_state *css,
			struct cftype *cft)
{
	struct schedtune *st = css_st(css);

	return st->sched_boost_enabled;
}

static int sched_boost_enabled_write(struct cgroup_subsys_state *css,
			struct cftype *cft, u64 enable)
{
	struct schedtune *st = css_st(css);

	st->sched_boost_enabled = !!enable;
	st->sched_boost_enabled_backup = st->sched_boost_enabled;

	return 0;
}

static u64 sched_colocate_read(struct cgroup_subsys_state *css,
			struct cftype *cft)
{
@@ -667,11 +639,6 @@ static struct cftype files[] = {
		.read_u64 = sched_boost_override_read,
		.write_u64 = sched_boost_override_write,
	},
	{
		.name = "sched_boost_enabled",
		.read_u64 = sched_boost_enabled_read,
		.write_u64 = sched_boost_enabled_write,
	},
	{
		.name = "colocate",
		.read_u64 = sched_colocate_read,