
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/release-management/issues/IC8X6H -------------------------------- Currently, for soft-domain task, numa migration is not yet implemented. Signed-off-by: Zhang Qiao <zhangqiao22@huawei.com> --- kernel/sched/fair.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index e94702c157c7..56f407770be0 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9947,6 +9947,17 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env) if (throttled_lb_pair(task_group(p), env->src_cpu, env->dst_cpu)) return 0; +#ifdef CONFIG_SCHED_SOFT_DOMAIN + /* Do not migrate soft domain tasks to outside of prefer cluster. */ + if (sched_feat(SOFT_DOMAIN)) { + struct soft_domain_ctx *ctx = task_group(p)->sf_ctx; + + if (ctx && ctx->policy && + !cpumask_test_cpu(env->dst_cpu, to_cpumask(ctx->span))) + return 0; + } +#endif + /* Disregard pcpu kthreads; they are where they need to be. */ if (kthread_is_per_cpu(p)) return 0; -- 2.18.0.huawei.25