The commit is pushed to "branch-rh7-3.10.0-327.22.2.vz7.16.x-ovz" and will 
appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.22.2.vz7.16.4
------>
commit 1a15665aa2fdebdcb958073c8d8ffd7c256ca88f
Author: Vladimir Davydov <[email protected]>
Date:   Wed Aug 10 19:05:34 2016 +0400

    ve/sched: fair: fix dst pinned not set when failing migration due to 
cpulimit restriction
    
    When failing task migration due to cpulimit restriction, we should set
    dst pinned flag so that the load balancing procedure will proceed to the
    next cpu, just like in case of failing task migration due to affinity
    mask (see can_migrate_task). We don't do that since rebase to
    3.10.0-327.18.2.el7. Fix that.
    
    Signed-off-by: Vladimir Davydov <[email protected]>
---
 kernel/sched/fair.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 4cebf60..96e581a 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5465,15 +5465,17 @@ static inline int can_migrate_task_cpulimit(struct 
task_struct *p, struct lb_env
 
                schedstat_inc(p, se.statistics.nr_failed_migrations_cpulimit);
 
+               env->flags |= LBF_SOME_PINNED;
+
                if (check_cpulimit_spread(tg, env->src_cpu) != 0)
                        return 0;
 
-               if (!env->dst_grpmask || (env->flags & LBF_SOME_PINNED))
+               if (!env->dst_grpmask || (env->flags & LBF_DST_PINNED))
                        return 0;
 
                for_each_cpu_and(cpu, env->dst_grpmask, env->cpus) {
                        if (cfs_rq_active(tg->cfs_rq[cpu])) {
-                               env->flags |= LBF_SOME_PINNED;
+                               env->flags |= LBF_DST_PINNED;
                                env->new_dst_cpu = cpu;
                                break;
                        }
_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to