Commit 863fbf96 authored by Zhang Qiao's avatar Zhang Qiao Committed by Yang Yingliang
Browse files

sched: Unthrottle the throttled cfs rq when offline rq

hulk inclusion
category: feature
bugzilla: 51828, https://gitee.com/openeuler/kernel/issues/I4K96G


CVE: NA

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

In order for the throttled task to continue running
after the CPU is offline, we need unthrottle the
throttled cfs rq saved in the qos_throttled_cfs_rq.

Signed-off-by: default avatarZhang Qiao <zhangqiao22@huawei.com>
Signed-off-by: default avatarZheng Zucheng <zhengzucheng@huawei.com>
Reviewed-by: default avatarChen Hui <judy.chenhui@huawei.com>
Reviewed-by: default avatarXiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 32170886
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -101,6 +101,8 @@ int __weak arch_asym_cpu_priority(int cpu)

#ifdef CONFIG_QOS_SCHED
static DEFINE_PER_CPU_SHARED_ALIGNED(struct list_head, qos_throttled_cfs_rq);

static int unthrottle_qos_cfs_rqs(int cpu);
#endif

#ifdef CONFIG_CFS_BANDWIDTH
@@ -5131,6 +5133,10 @@ static void __maybe_unused unthrottle_offline_cfs_rqs(struct rq *rq)
			unthrottle_cfs_rq(cfs_rq);
	}
	rcu_read_unlock();

#ifdef CONFIG_QOS_SCHED
	unthrottle_qos_cfs_rqs(cpu_of(rq));
#endif
}

#else /* CONFIG_CFS_BANDWIDTH */