sched: Do not ignore grouped tasks during HMP forced migration.
authorChris Redpath <chris.redpath@arm.com>
Thu, 16 May 2013 16:48:01 +0000 (17:48 +0100)
committerJon Medhurst <tixy@linaro.org>
Wed, 17 Jul 2013 10:12:26 +0000 (11:12 +0100)
If the entity is not a task, it is a cfs group rq. Iterate up to
find the task entity.

Change-Id: I7cab7aba0798f6f14e38ad32e566d90e5937ffbc
Signed-off-by: Chris Redpath <chris.redpath@arm.com>
kernel/sched/fair.c

index 474dc61b3afeee35d1893408da94faaeef26938e..3866dcc9972d31909fa56f26e4f187c68c15669b 100644 (file)
@@ -6109,10 +6109,19 @@ static void hmp_force_up_migration(int this_cpu)
                target = cpu_rq(cpu);
                raw_spin_lock_irqsave(&target->lock, flags);
                curr = target->cfs.curr;
-               if (!curr || !entity_is_task(curr)) {
+               if (!curr) {
                        raw_spin_unlock_irqrestore(&target->lock, flags);
                        continue;
                }
+               if (!entity_is_task(curr)) {
+                       struct cfs_rq *cfs_rq;
+
+                       cfs_rq = group_cfs_rq(curr);
+                       while (cfs_rq) {
+                               curr = cfs_rq->curr;
+                               cfs_rq = group_cfs_rq(curr);
+                       }
+               }
                p = task_of(curr);
                if (hmp_up_migration(cpu, curr)) {
                        if (!target->active_balance) {