From b4fe706492e84ca0b7dcfebd13ab953a03dd6294 Mon Sep 17 00:00:00 2001 From: Zhang Qiao Date: Mon, 12 Jul 2021 20:09:41 +0800 Subject: [PATCH] sched: Unthrottle the throttled cfs rq when offline rq hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I3ZX4D CVE: NA -------------------------------- In cpu hotplug case, when a cpu go to offline, we should unthrottle cfs_rq which be throttled on this cpu, so they will be migrated to online cpu. Signed-off-by: Zhang Qiao Signed-off-by: Zheng Zucheng Reviewed-by: Chen Hui Signed-off-by: Zheng Zengkai --- kernel/sched/fair.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 9be94f38f944..e9f51193d935 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -117,6 +117,7 @@ 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 @@ -5374,6 +5375,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 */ -- GitLab