Re: [PATCH 3/4 UPDATED] scheduler: replace migration_thread withcpu_stop

From: Paul E. McKenney
Date: Thu May 06 2010 - 14:43:00 EST


On Thu, May 06, 2010 at 06:30:40PM +0200, Tejun Heo wrote:
> On 05/05/2010 10:31 PM, Paul E. McKenney wrote:
> > Almost. With the following patch, I am good with it.
>
> Ah, right. What was I thinking? I'll include your patch and push it
> to Ingo. Thanks.

And of course, I overdid it in my patch when I removed smp_mb() from
the !SMP version of synchronize_sched_expedited(). :-/

If synchronize_sched_expedited() is ever to be invoked from within
kernel/sched.c in a UP kernel, there needs to be a "barrier()" in the
!SMP version. So please see the following patch.

Thanx, Paul

commit 0eab52c0eeeb8507a83bdb37cc8f690b1c4f4a2c
Author: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
Date: Thu May 6 11:40:17 2010 -0700

rcu: need barrier() in UP synchronize_sched_expedited()

If synchronize_sched_expedited() is ever to be called from within
kernel/sched.c in a !SMP PREEMPT kernel, the !SMP implementation needs
a barrier().

Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>

diff --git a/kernel/sched.c b/kernel/sched.c
index 155a16d..fbaf312 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -8932,6 +8932,7 @@ struct cgroup_subsys cpuacct_subsys = {

void synchronize_sched_expedited(void)
{
+ barrier();
}
EXPORT_SYMBOL_GPL(synchronize_sched_expedited);

--
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/