Commit d9099163 authored by Hui Tang's avatar Hui Tang Committed by zhangchangzhong
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>
parent 373fd236
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -5687,6 +5687,9 @@ static void destroy_auto_affinity(struct task_group *tg)
{
	struct auto_affinity *auto_affi = tg->auto_affinity;

	if (auto_affi->mode)
		smart_grid_usage_dec();

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