From: Steven Rostedt <rostedt@goodmis.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>, gcc <gcc@gcc.gnu.org>,
Ingo Molnar <mingo@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
"H. Peter Anvin" <hpa@linux.intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
David Daney <ddaney.cavm@gmail.com>,
Behan Webster <behanw@converseincode.com>,
Peter Zijlstra <peterz@infradead.org>,
Herbert Xu <herbert@gondor.hengli.com.au>
Subject: Re: [RFC] gcc feature request: Moving blocks into sections
Date: Mon, 05 Aug 2013 15:39:23 -0400 [thread overview]
Message-ID: <1375731563.22073.149.camel@gandalf.local.home> (raw)
In-Reply-To: <CA+55aFyfvifCu=jDBH8LPmEHtvooVyo25dvJ+T6SQLhVidBBdQ@mail.gmail.com>
On Mon, 2013-08-05 at 11:49 -0700, Linus Torvalds wrote:
> On Mon, Aug 5, 2013 at 11:39 AM, Steven Rostedt <rostedt@goodmis.org> wrote:
> >
> > I had patches that did exactly this:
> >
> > https://lkml.org/lkml/2012/3/8/461
> >
> > But it got dropped for some reason. I don't remember why. Maybe because
> > of the complexity?
>
> Ugh. Why the crazy update_jump_label script stuff? I'd go "Eww" at
> that too, it looks crazy. The assembler already knows to make short
> 2-byte "jmp" instructions for near jumps, and you can just look at the
> opcode itself to determine size, why is all that other stuff required?
Hmm, I probably added that "optimization" in there because I was doing a
bunch of jump label work and just included it in. It's been over a year
since I've worked on this so I don't remember all the details. That
update_jump_label program may have just been to do the conversion of
nops at compile time and not during boot. It may not be needed. Also, it
was based on the record-mcount code that the function tracer uses, which
is also done at compile time, to get all the mcount locations.
>
> IOW, 5/7 looks sane, but 4/7 makes me go "there's something wrong with
> that series".
I just quickly looked at the changes again. I think I can redo them and
send them again for 3.12. What do you think about keeping all but patch
4?
1 - Use a default nop at boot. I had help from hpa on this. Currently,
jump labels use a jmp instead of a nop on boot.
2 - On boot, the jump label nops (jump before patch 1) looks at the best
run time nop, and converts them. Since it is likely that the current
nop is already ideal, skip the conversion. Again, this is just a
boot up optimization.
3 - Add a test to see what we are converting. Adds safety checks like
there
is in the function tracer, where if it updates a location, and does
not
find what it expects to find, output a nasty bug.
< will skip patch 4 >
5 - Does what you want, with the 2 and 5 byte nops.
6 - When/if a failure does trigger. Print out information to what went
wrong. Helps debugging splats caused by patch 3.
7 - needs to go before patch 3. As patch 3 can trigger if the default
nop
is not the ideal nop for the box that is running. <reported by Ingo>
If I take out patch 4, would that solution look fine for you? I can get
this ready for 3.12.
-- Steve
next prev parent reply other threads:[~2013-08-05 19:39 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-05 16:55 Steven Rostedt
2013-08-05 17:02 ` H. Peter Anvin
2013-08-05 17:24 ` Steven Rostedt
2013-08-05 17:12 ` Linus Torvalds
2013-08-05 17:15 ` Linus Torvalds
2013-08-05 17:55 ` Steven Rostedt
2013-08-05 18:11 ` Steven Rostedt
2013-08-05 18:17 ` H. Peter Anvin
2013-08-05 18:23 ` Steven Rostedt
2013-08-05 18:29 ` H. Peter Anvin
2013-08-05 18:49 ` Steven Rostedt
2013-08-05 18:51 ` H. Peter Anvin
2013-08-05 19:01 ` Linus Torvalds
2013-08-05 19:54 ` Mathieu Desnoyers
2013-08-05 19:57 ` Linus Torvalds
2013-08-05 20:02 ` Steven Rostedt
2013-08-05 21:28 ` Mathieu Desnoyers
2013-08-05 21:43 ` H. Peter Anvin
2013-08-06 4:14 ` Mathieu Desnoyers
2013-08-06 4:28 ` H. Peter Anvin
2013-08-06 16:15 ` Steven Rostedt
2013-08-06 16:19 ` H. Peter Anvin
2013-08-06 16:26 ` Steven Rostedt
2013-08-06 16:29 ` H. Peter Anvin
2013-08-05 21:44 ` Steven Rostedt
2013-08-05 22:08 ` Mathieu Desnoyers
2013-08-05 19:09 ` Steven Rostedt
2013-08-05 18:20 ` Linus Torvalds
2013-08-05 18:24 ` Linus Torvalds
2013-08-05 18:34 ` Linus Torvalds
2013-08-05 18:38 ` H. Peter Anvin
2013-08-05 19:04 ` Steven Rostedt
2013-08-05 19:40 ` Marek Polacek
2013-08-05 19:56 ` Linus Torvalds
2013-08-05 19:57 ` Jason Baron
2013-08-05 20:35 ` Richard Henderson
2013-08-06 2:26 ` Jason Baron
2013-08-06 3:03 ` Steven Rostedt
2013-08-05 18:33 ` H. Peter Anvin
2013-08-05 18:39 ` Steven Rostedt
2013-08-05 18:49 ` Linus Torvalds
2013-08-05 19:39 ` Steven Rostedt [this message]
2013-08-06 14:19 ` Steven Rostedt
2013-08-06 17:48 ` Linus Torvalds
2013-08-06 17:58 ` Steven Rostedt
2013-08-06 20:33 ` Mathieu Desnoyers
2013-08-06 20:43 ` Steven Rostedt
2013-08-07 0:45 ` Steven Rostedt
2013-08-07 0:56 ` Steven Rostedt
2013-08-07 5:06 ` Ondřej Bílka
2013-08-07 15:02 ` Steven Rostedt
2013-08-07 16:03 ` Mathieu Desnoyers
2013-08-07 16:11 ` Steven Rostedt
2013-08-07 23:22 ` Mathieu Desnoyers
2013-08-05 20:06 ` Jason Baron
2013-08-05 19:04 ` Andi Kleen
2013-08-05 19:16 ` Steven Rostedt
2013-08-05 19:30 ` Xinliang David Li
2013-08-05 19:25 ` Linus Torvalds
2013-08-12 9:17 ` Peter Zijlstra
2013-08-12 14:56 ` H. Peter Anvin
2013-08-12 16:02 ` Andi Kleen
2013-08-12 16:11 ` Peter Zijlstra
2013-08-12 16:09 ` Peter Zijlstra
2013-08-12 17:47 ` H. Peter Anvin
2013-08-13 7:50 ` Peter Zijlstra
2013-08-13 14:46 ` H. Peter Anvin
2013-08-13 14:52 ` Steven Rostedt
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=1375731563.22073.149.camel@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=behanw@converseincode.com \
--cc=ddaney.cavm@gmail.com \
--cc=gcc@gcc.gnu.org \
--cc=herbert@gondor.hengli.com.au \
--cc=hpa@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--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
all inboxes | Powered by JetHome®