Commit faacf4c8 authored by Hui Tang's avatar Hui Tang Committed by Yipeng Zou
Browse files

sched: fix smart grid usage count

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7D98G


CVE: NA

----------------------------------------

smart_grid_usage_dec() should called when free taskgroup
if the mode is auto.

Signed-off-by: default avatarHui Tang <tanghui20@huawei.com>
Reviewed-by: default avatarZhang Qiao <zhangqiao22@huawei.com>
Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
Signed-off-by: default avatarYipeng Zou <zouyipeng@huawei.com>
parent 700bfc40
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -6215,6 +6215,9 @@ static void destroy_auto_affinity(struct task_group *tg)
{
{
	struct auto_affinity *auto_affi = tg->auto_affinity;
	struct auto_affinity *auto_affi = tg->auto_affinity;


	if (auto_affi->mode)
		smart_grid_usage_dec();

	hrtimer_cancel(&auto_affi->period_timer);
	hrtimer_cancel(&auto_affi->period_timer);
	free_affinity_domains(&auto_affi->ad);
	free_affinity_domains(&auto_affi->ad);