!323 [OLK-5.10] sched: Introduce priority load balance for CFS
Merge Pull Request from: @zhangsong234 euleros inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5HF3M CVE: NA Add new sysctl interface: `/proc/sys/kernel/sched_prio_load_balance_enabled` 0: default behavior 1: enable priority load balance for qos scheduler For tasks co-location with qos scheduler, when CFS do load balance, it is reasonable to prefer migrating online(Latency Sensitive) tasks. So the CFS load balance can be changed to below: 1) `cfs_tasks` list is owned by online tasks. 2) Add new `cfs_offline_tasks` list which is owned by offline tasks. 3) Prefer to migrate the online tasks of `cfs_tasks` list to dst rq. In the scenario of hyperthread interference, if the smt expeller feature enabled, CPU A and CPU B are two hyperthreads on a physical core, CPU A runs online tasks while CPU B only has offline tasks, The offline tasks on CPU B are expelled by the online tasks on CPU A and cannot be scheduled. However, when load balance is triggered, before CPU B can migrate some online tasks from CPU A, the load on the two cpus is already balanced. As a result, CPU B cannot run online tasks and online tasks cannot be evenly distributed among different cpus. Link:https://gitee.com/openeuler/kernel/pulls/323 Reviewed-by: Zheng Zengkai <zhengzengkai@huawei.com> Reviewed-by: Zucheng Zheng <zhengzucheng@huawei.com> Reviewed-by: Liu Chao <liuchao173@huawei.com> Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录