Messages in this thread Patch in this message | | | Date | Sat, 2 Jun 2012 17:50:29 +0800 | Subject | Re: [patch] BFS 420: a tiny step forward | From | Hillf Danton <> |
| |
Hi Emmanuel and Manuel
On Thu, May 31, 2012 at 9:16 PM, Emmanuel Benisty <benisty.e@gmail.com> wrote: > > it builds fine now but it won't boot. Some crappy > mobile phone picture here: > http://ompldr.org/vZTE1eQ/IMG_20120531_200543.jpg > The ttwu was messed up by Hillf, lets revert it.
Good Weekend -hd
--- a/kernel/sched/bfs.c Sat Jun 2 17:14:58 2012 +++ b/kernel/sched/bfs.c Sat Jun 2 17:30:28 2012 @@ -1491,6 +1491,8 @@ static void ttwu_stat(struct task_struct #ifdef CONFIG_SMP if (success) p->wakeup_cpu = smp_processor_id(); +#else + schedstat_inc(rq, ttwu_local); #endif schedstat_inc(rq, ttwu_count); #endif @@ -1515,8 +1517,6 @@ static inline void ttwu_post_activation( bool success) { trace_sched_wakeup(p, success); - if (!success) - return; p->state = TASK_RUNNING;
/* @@ -1562,8 +1562,6 @@ static bool try_to_wake_up(struct task_s /* This barrier is undocumented, probably for p->state? くそ */ smp_wmb();
- if (!(p->state & state)) - goto out; /* * No need to do time_lock_grq as we only need to update the rq clock * if we activate the task @@ -1586,7 +1584,6 @@ out_running: out_unlock: task_grq_unlock(&flags);
-out: ttwu_stat(p, success);
put_cpu(); @@ -1610,17 +1607,14 @@ static void try_to_wake_up_local(struct lockdep_assert_held(&grq.lock);
if (!(p->state & TASK_NORMAL)) - goto out; - - if (task_queued(p) || task_running(p)) - goto out; - - ttwu_activate(p, rq, false); - success = true; + return;
-out: + if (!task_queued(p)) { + ttwu_activate(p, rq, false); + success = true; + ttwu_stat(p, success); + } ttwu_post_activation(p, rq, success); - ttwu_stat(p, success); }
/** @@ -3052,8 +3046,10 @@ task_struct *earliest_deadline_task(stru * deadline when the CPU is scaling, based on cpu * cache locality. */ - dl = p->deadline << (locality_diff(p, rq) + - !!scaling_rq(rq)); + dl = p->deadline; +#ifdef CONFIG_SMP + dl <<= locality_diff(p, rq) + scaling_rq(rq); +#endif
if (deadline_before(dl, earliest_deadline)) { earliest_deadline = dl; -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |