From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Tejun Heo <tj@kernel.org>
Cc: linux-kernel@vger.kernel.org, rusty@rustcorp.com.au,
sivanich@sgi.com, torvalds@linux-foundation.org, mingo@elte.hu,
peterz@infradead.org, dipankar@in.ibm.com, josh@freedesktop.org,
paulmck@linux.vnet.ibm.com, oleg@redhat.com,
akpm@linux-foundation.org,
Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: Re: [PATCH 2/4] stop_machine: reimplement using cpuhog
Date: Mon, 8 Mar 2010 18:10:20 +0100 [thread overview]
Message-ID: <20100308171020.GC2557@osiris.boeblingen.de.ibm.com> (raw)
In-Reply-To: <1268063603-7425-3-git-send-email-tj@kernel.org>
On Tue, Mar 09, 2010 at 12:53:21AM +0900, Tejun Heo wrote:
> Reimplement stop_machine using cpuhog. As cpuhogs are guaranteed to
> be available for all online cpus, stop_machine_create/destroy() are no
> longer necessary and removed.
>
> With resource management and synchronization handled by cpuhog, the
> new implementation is much simpler. Asking the cpuhog to execute the
> stop_cpu() state machine on all online cpus with cpu hotplug disabled
> is enough.
>
> stop_machine itself doesn't need to manage any global resources
> anymore, so all per-instance information is rolled into struct
> stop_machine_data and the mutex and all static data variables are
> removed.
>
> The previous implementation created and destroyed RT workqueues as
> necessary which made stop_machine() calls highly expensive on very
> large machines. According to Dimitri Sivanich, preventing the dynamic
> creation/destruction makes booting faster more than twice on very
> large machines. cpuhog resources are preallocated for all online cpus
> and should have the same effect.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Cc: Rusty Russell <rusty@rustcorp.com.au>
> Cc: Oleg Nesterov <oleg@redhat.com>
> Cc: Dimitri Sivanich <sivanich@sgi.com>
> ---
> arch/s390/kernel/time.c | 1 -
> drivers/xen/manage.c | 14 +---
> include/linux/stop_machine.h | 20 -----
> kernel/cpu.c | 8 --
> kernel/module.c | 14 +---
> kernel/stop_machine.c | 162 ++++++++++--------------------------------
> 6 files changed, 42 insertions(+), 177 deletions(-)
>
> diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
> index 65065ac..afe429e 100644
> --- a/arch/s390/kernel/time.c
> +++ b/arch/s390/kernel/time.c
> @@ -397,7 +397,6 @@ static void __init time_init_wq(void)
> if (time_sync_wq)
> return;
> time_sync_wq = create_singlethread_workqueue("timesync");
> - stop_machine_create();
> }
>
> /*
The reason we introduced stop_machine_create/destroy was to have a non-failing
variant that doesn't rely on I/O.
If we ever see a timesync machine check no I/O will succeed (it blocks) until
clocks have been synchronized. That means also that we rely on the non-blocking
semantics that those functions must have that are called via stop_machine.
This isn't true anymore with the cpu hog infrastructure:
if passed a blocking function that could wait on I/O we won't see any progress
anymore and the machine is dead.
next prev parent reply other threads:[~2010-03-08 17:10 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-08 15:53 [PATCHSET] cpuhog: implement and use cpuhog Tejun Heo
2010-03-08 15:53 ` [PATCH 1/4] cpuhog: implement cpuhog Tejun Heo
2010-03-08 19:01 ` Oleg Nesterov
2010-03-08 23:18 ` Tejun Heo
2010-03-08 15:53 ` [PATCH 2/4] stop_machine: reimplement using cpuhog Tejun Heo
2010-03-08 16:32 ` Arjan van de Ven
2010-03-08 23:21 ` Tejun Heo
2010-03-08 17:10 ` Heiko Carstens [this message]
2010-03-08 18:27 ` Oleg Nesterov
2010-03-08 19:37 ` Heiko Carstens
2010-03-08 23:39 ` Tejun Heo
2010-03-09 7:09 ` Heiko Carstens
2010-03-09 7:16 ` Tejun Heo
2010-03-08 19:06 ` Oleg Nesterov
2010-03-08 23:22 ` Tejun Heo
2010-03-08 15:53 ` [PATCH 3/4] scheduler: replace migration_thread with cpuhog Tejun Heo
2010-03-08 15:53 ` [PATCH 4/4] scheduler: kill paranoia check in synchronize_sched_expedited() Tejun Heo
2010-03-10 19:25 ` [PATCHSET] cpuhog: implement and use cpuhog Peter Zijlstra
2010-03-12 3:13 ` Tejun Heo
2010-03-29 6:46 ` Rusty Russell
2010-03-29 9:11 ` Peter Zijlstra
2010-04-02 5:45 ` Tejun Heo
2010-03-17 8:40 [PATCHSET sched/core] cpuhog: implement and use cpuhog, take#2 Tejun Heo
2010-03-17 8:40 ` [PATCH 2/4] stop_machine: reimplement using cpuhog Tejun Heo
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=20100308171020.GC2557@osiris.boeblingen.de.ibm.com \
--to=heiko.carstens@de.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=dipankar@in.ibm.com \
--cc=josh@freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oleg@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=rusty@rustcorp.com.au \
--cc=schwidefsky@de.ibm.com \
--cc=sivanich@sgi.com \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.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
Powered by JetHome