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

Commit 203aea27 authored by Patrick Bellasi's avatar Patrick Bellasi
Browse files

FIXUP: sched/tune: add fixes missing from a previous patch



The previous patch:

  e7ce26f0 - FIXUP: sched/tune: fix accounting for runnable tasks

squashed together patches of a series to fix SchedTune's accounting
issues. However, in the consolidation and cleanup of the series to merge
in the Android Common Kernel, we somehow missed a couple of important
changes:
1) the schedtune_exit function is not more required, because e7ce26f0
   fixes accounting of exiting tasks in a different way
2) the schedtune_initialized flag was not set at the end of
   scheddtune_init_cgroup() thus failing to enabled SchedTune at boot.

This patch thus is to be considered an integration of e7ce26f0.

Signed-off-by: default avatarPatrick Bellasi <patrick.bellasi@arm.com>
parent f8af3641
Loading
Loading
Loading
Loading
+2 −12
Original line number Diff line number Diff line
@@ -717,21 +717,9 @@ schedtune_css_free(struct cgroup_subsys_state *css)
	kfree(st);
}

static void
schedtune_exit(struct cgroup_subsys_state *css,
		struct cgroup_subsys_state *old_css,
		struct task_struct *tsk)
{
	struct schedtune *old_st = css_st(old_css);
	int cpu = task_cpu(tsk);

	schedtune_tasks_update(tsk, cpu, old_st->idx, -1);
}

struct cgroup_subsys schedtune_cgrp_subsys = {
	.css_alloc	= schedtune_css_alloc,
	.css_free	= schedtune_css_free,
	.exit		= schedtune_exit,
	.allow_attach   = schedtune_allow_attach,
	.can_attach     = schedtune_can_attach,
	.cancel_attach  = schedtune_cancel_attach,
@@ -753,6 +741,8 @@ schedtune_init_cgroups(void)

	pr_info("schedtune: configured to support %d boost groups\n",
		BOOSTGROUPS_COUNT);

	schedtune_initialized = true;
}

#else /* CONFIG_CGROUP_SCHEDTUNE */