From: Steven Rostedt <rostedt@goodmis.org>
To: Jan Glauber <jang@linux.vnet.ibm.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
Jason Baron <jbaron@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Michael Ellerman <michael@ellerman.id.au>,
David Daney <ddaney@caviumnetworks.com>,
"David S. Miller" <davem@davemloft.net>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: Re: Jump Label initialization
Date: Thu, 29 Sep 2011 08:40:26 -0400 [thread overview]
Message-ID: <1317300028.4588.15.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <1317297894.23938.9.camel@localhost.localdomain>
On Thu, 2011-09-29 at 14:04 +0200, Jan Glauber wrote:
> On Wed, 2011-09-28 at 19:14 -0700, Jeremy Fitzhardinge wrote:
> > Hi all,
> >
> > I'm trying to use the jump label machinery as part of the pv ticketlock
> > work I'm doing on x86.
> >
> > The problem I'm having at the moment is that I do my spinlock setup in
> > smp_prepare_boot_cpu(), which happens before jump_label_init() gets
> > called, and so the latter goes and nops out all my enabled jump label key.
> >
> > I'm experimenting at the moment with a patch to allow
> > jump_label_enable() to be called fairly early, and have that be
> > respected by jump_label_init(). I'm doing this by replacing
> > arch_jump_label_poke_text_early() with
> > arch_jump_label_transform_early(), which shares most of its code with
> > its non-early variant, except that it expects to run in a pre-SMP
> > environment.
> >
> > Does this seem plausible? (I haven't tested it yet.)
> >
> > The x86, mips and sparc patches are fairly simple; I forgot to look at
> > powerpc, and I didn't fully investigate s390.
>
> s390 does not have the early() variant since it didn't need it. On
> pre-SMP we probably don't need stop_machine() so creating
> arch_jump_label_transform_early() by leaving out stop_machine()
> and patching the code directly should be fine.
Also note that stop_machine() may only be needed by a few archs (maybe
only x86).
x86 has a nasty condition if you change code that is being loaded in
another CPUs pipeline, it could cause a GPF. I've been playing with this
on PPC and this does not have that same bug. In fact Benjamin told me
that PPC is fine with modifying instructions on a running system.
I plan on removing the stop_machine() from ftrace for those boxes. I
already have patches made, just need to spiffy them up a bit.
-- Steve
next prev parent reply other threads:[~2011-09-29 12:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-29 2:14 Jeremy Fitzhardinge
2011-09-29 2:28 ` David Miller
2011-09-29 7:37 ` Peter Zijlstra
2011-09-29 22:20 ` Jeremy Fitzhardinge
2011-09-29 22:23 ` Steven Rostedt
2011-09-29 12:04 ` Jan Glauber
2011-09-29 12:40 ` Steven Rostedt [this message]
2011-09-29 13:10 ` Jan Glauber
2011-09-29 16:45 ` Jeremy Fitzhardinge
2011-09-29 17:06 ` David Daney
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=1317300028.4588.15.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=benh@kernel.crashing.org \
--cc=davem@davemloft.net \
--cc=ddaney@caviumnetworks.com \
--cc=jang@linux.vnet.ibm.com \
--cc=jbaron@redhat.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@ellerman.id.au \
--cc=peterz@infradead.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
all inboxes | Powered by JetHome®