From: Tejun Heo <tj@kernel.org>
To: x86@kernel.org, mingo@elte.hu, akpm@linux-foundation.org,
torvalds@linux-foundation.org, suresh.b.siddha@intel.com,
a.p.zijlstra@chello.nl, linux-kernel@vger.kernel.org
Subject: [PATCHSET] stop_machine: implement stop_machine_from_offline_cpu()
Date: Tue, 14 Jun 2011 19:06:55 +0200 [thread overview]
Message-ID: <1308071218-5912-1-git-send-email-tj@kernel.org> (raw)
Hello,
This three patch series implements stop_machine_from_offline_cpu(),
which is stop_machine() which can be used from a CPU which isn't yet
online.
This is for mtrr which needs stop_machine while bringing up a CPU. It
currently implements its own stop_machine directly using
stop_one_cpu(). Duplicating such core functionality is wasteful and
fragile. e.g. mtrr's implementation currently can deadlock against
generic stop_machine().
This patchset is born from Suresh's attempt at implementing similar
feature into [__]stop_machine()[1], which IMHO is a bit too subtle.
Given the peculiarity of the feature, I think it's better to have
dedicated function with an ugly name. Also, this way, the
implementation is very well isolated from the rest of stop_cpus
machinery and much simpler.
This patchset contains the following three patches.
0001-stop_machine-kill-__stop_machine.patch
0002-stop_machine-reorganize-stop_cpus-implementation.patch
0003-stop_machine-implement-stop_machine_from_offline_cpu.patch
0001 is a cleanup patch which can go in regardless of the rest (with
ack from x86 people of course). 0002 is pure code reorganization.
0003 implements the feature.
Suresh, how does this look to you? Can you please put the mtrr
changes on top of this and see how it works?
arch/x86/kernel/alternative.c | 5 -
include/linux/stop_machine.h | 42 +++------------
kernel/cpu.c | 2
kernel/stop_machine.c | 117 +++++++++++++++++++++++++++++++++++-------
4 files changed, 114 insertions(+), 52 deletions(-)
Thanks.
--
tejun
[1] http://thread.gmane.org/gmane.linux.kernel/1154383/focus=1154384
next reply other threads:[~2011-06-14 17:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-14 17:06 Tejun Heo [this message]
2011-06-14 17:06 ` [PATCH 1/3] stop_machine: kill __stop_machine() Tejun Heo
2011-06-16 12:12 ` Peter Zijlstra
2011-06-16 12:44 ` Tejun Heo
2011-06-16 17:37 ` Suresh Siddha
2011-06-16 17:55 ` Peter Zijlstra
2011-06-16 18:17 ` Suresh Siddha
2011-06-16 18:28 ` Tejun Heo
2011-06-16 18:36 ` Peter Zijlstra
2011-06-16 18:44 ` Suresh Siddha
2011-06-16 18:28 ` Peter Zijlstra
2011-06-14 17:06 ` [PATCH 2/3] stop_machine: reorganize stop_cpus() implementation Tejun Heo
2011-06-14 17:06 ` [PATCH 3/3] stop_machine: implement stop_machine_from_offline_cpu() Tejun Heo
2011-06-16 12:10 ` [PATCHSET] " Peter Zijlstra
2011-06-16 12:15 ` Tejun Heo
2011-06-16 17:21 ` Suresh Siddha
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=1308071218-5912-1-git-send-email-tj@kernel.org \
--to=tj@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=suresh.b.siddha@intel.com \
--cc=torvalds@linux-foundation.org \
--cc=x86@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