[patch 4/4] BFS 420: fix try_to_wake_up_local

From: Hillf Danton
Date: Fri May 25 2012 - 09:37:44 EST


It is changed to be the same behavior with ttwu.

--- a/kernel/sched/bfs.c Mon May 14 20:50:38 2012
+++ b/kernel/sched/bfs.c Fri May 25 20:28:00 2012
@@ -1630,18 +1630,16 @@ static void try_to_wake_up_local(struct
lockdep_assert_held(&grq.lock);

if (!(p->state & TASK_NORMAL))
- return;
+ goto out;

- if (!task_queued(p)) {
- if (likely(!task_running(p))) {
- schedstat_inc(rq, ttwu_count);
- schedstat_inc(rq, ttwu_local);
- }
- ttwu_activate(p, rq, false);
- ttwu_stat(p, smp_processor_id(), true);
- success = true;
- }
+ if (task_queued(p) || task_running(p))
+ goto out;
+
+ ttwu_activate(p, rq, false);
+ success = true;
+out:
ttwu_post_activation(p, rq, success);
+ ttwu_stat(p, smp_processor_id(), success);
}

/**
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/