public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	"Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>,
	Rusty Russell <rusty@rustcorp.com.au>, Tejun Heo <tj@kernel.org>
Subject: Re: [RFC patch 2/5] smpboot: Provide infrastructure for percpu hotplug threads
Date: Wed, 13 Jun 2012 13:47:25 -0700	[thread overview]
Message-ID: <20120613204725.GA9858@linux.vnet.ibm.com> (raw)
In-Reply-To: <20120613191745.GG2427@linux.vnet.ibm.com>

On Wed, Jun 13, 2012 at 12:17:45PM -0700, Paul E. McKenney wrote:
> On Wed, Jun 13, 2012 at 09:02:55PM +0200, Thomas Gleixner wrote:
> > On Wed, 13 Jun 2012, Paul E. McKenney wrote:
> > > On Wed, Jun 13, 2012 at 11:00:54AM -0000, Thomas Gleixner wrote:
> > > >  	/* Now call notifier in preparation. */
> > > >  	cpu_notify(CPU_ONLINE | mod, hcpu);
> > > > +	smpboot_unpark_threads(cpu);
> > > 
> > > OK, RCU must use the lower-level interfaces, given that one of
> > > then CPU_ONLINE notifiers might invoke synchronize_rcu().
> > 
> > We can start the threads before the notifiers. There is no
> > restriction.
> 
> Sounds very good in both cases!

Just for reference, here is what I am using.


Anticipatory changes in advance of Thomas's next patchset

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 6ab5d82..510ba5e 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -372,10 +372,10 @@ static int __cpuinit _cpu_up(unsigned int cpu, int tasks_frozen)
 	if (ret != 0)
 		goto out_notify;
 	BUG_ON(!cpu_online(cpu));
+	smpboot_unpark_threads(cpu);
 
 	/* Now call notifier in preparation. */
 	cpu_notify(CPU_ONLINE | mod, hcpu);
-	smpboot_unpark_threads(cpu);
 
 out_notify:
 	if (ret != 0)
diff --git a/kernel/smpboot.c b/kernel/smpboot.c
index d7a3659..7d54e7c 100644
--- a/kernel/smpboot.c
+++ b/kernel/smpboot.c
@@ -201,7 +201,7 @@ void smpboot_park_threads(unsigned int cpu)
 	struct smp_hotplug_thread *cur;
 
 	mutex_lock(&smpboot_threads_lock);
-	list_for_each_entry(cur, &hotplug_threads, list)
+	list_for_each_entry_reverse(cur, &hotplug_threads, list)
 		smpboot_park_thread(cur, cpu);
 	mutex_unlock(&smpboot_threads_lock);
 }


  reply	other threads:[~2012-06-13 20:47 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-13 11:00 [RFC patch 0/5] Per cpu thread hotplug infrastructure Thomas Gleixner
2012-06-13 11:00 ` [RFC patch 1/5] kthread: Implement park/unpark facility Thomas Gleixner
2012-06-14  2:32   ` Namhyung Kim
2012-06-14  8:35     ` Thomas Gleixner
2012-06-14  8:59       ` Thomas Gleixner
2012-06-14  8:36   ` Srivatsa S. Bhat
2012-06-14 20:01   ` Silas Boyd-Wickizer
2012-06-14 20:13     ` Thomas Gleixner
2012-06-14 22:13   ` Silas Boyd-Wickizer
2012-06-15  1:44     ` Tejun Heo
2012-06-13 11:00 ` [RFC patch 2/5] smpboot: Provide infrastructure for percpu hotplug threads Thomas Gleixner
2012-06-13 18:33   ` Paul E. McKenney
2012-06-13 18:56     ` Thomas Gleixner
2012-06-14  8:08       ` Peter Zijlstra
2012-06-14  8:17         ` Peter Zijlstra
2012-06-15  1:53           ` Tejun Heo
2012-06-15  9:58             ` Peter Zijlstra
2012-06-14  8:37         ` Thomas Gleixner
2012-06-14  8:38           ` Peter Zijlstra
2012-06-13 18:57   ` Paul E. McKenney
2012-06-13 19:02     ` Thomas Gleixner
2012-06-13 19:17       ` Paul E. McKenney
2012-06-13 20:47         ` Paul E. McKenney [this message]
2012-06-14  4:51           ` Paul E. McKenney
2012-06-14 11:20             ` Thomas Gleixner
2012-06-14 12:59               ` Paul E. McKenney
2012-06-14 13:01                 ` Peter Zijlstra
2012-06-14 14:47                   ` Paul E. McKenney
2012-06-14 14:56                     ` Peter Zijlstra
2012-06-14 15:07                       ` Thomas Gleixner
2012-06-14 15:45                       ` Paul E. McKenney
2012-06-14 16:20                         ` Thomas Gleixner
2012-06-14 13:32                 ` Thomas Gleixner
2012-06-14 13:47                   ` Thomas Gleixner
2012-06-14 14:12                     ` Thomas Gleixner
2012-06-14 15:01                       ` Paul E. McKenney
2012-06-14 15:08                         ` Thomas Gleixner
2012-06-14 14:50                   ` Paul E. McKenney
2012-06-14 15:02                     ` Thomas Gleixner
2012-06-14 15:38                     ` Paul E. McKenney
2012-06-14 16:19                       ` Thomas Gleixner
2012-06-14 16:48                         ` Paul E. McKenney
2012-06-14 22:40             ` Paul E. McKenney
2012-06-14  8:31   ` Srivatsa S. Bhat
2012-06-14  8:44     ` Thomas Gleixner
2012-06-18  8:47   ` Cyrill Gorcunov
2012-06-18  8:50     ` Thomas Gleixner
2012-06-13 11:00 ` [RFC patch 3/5] softirq: Use hotplug thread infrastructure Thomas Gleixner
2012-06-13 11:00 ` [RFC patch 4/5] watchdog: " Thomas Gleixner
2012-06-13 11:00 ` [RFC patch 5/5] infiniband: ehca: " Thomas Gleixner
2012-06-18  6:30   ` Rusty Russell
2012-06-18  8:08     ` Thomas Gleixner
2012-06-24 10:29       ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120613204725.GA9858@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rusty@rustcorp.com.au \
    --cc=srivatsa.bhat@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox