From: Steven Rostedt <rostedt@goodmis.org>
To: David Howells <dhowells@redhat.com>
Cc: ksummit-discuss@lists.linuxfoundation.org
Subject: Re: [Ksummit-discuss] [TECH TOPIC] Compiler shopping list
Date: Thu, 28 Jul 2016 21:32:19 -0400 [thread overview]
Message-ID: <20160728213219.5f26a404@grimm.local.home> (raw)
In-Reply-To: <15569.1469184060@warthog.procyon.org.uk>
On Fri, 22 Jul 2016 11:41:00 +0100
David Howells <dhowells@redhat.com> wrote:
> Are there additional things we can get the compiler to do for us? Some
> things I've seen brought up:
>
> (1) Additional __atomic_*() ops could be useful. Suggestions I've heard
> include direct LL/SC support - though the compiler people don't seem so
> keen on that.
>
> (2) -mmodel=kernel flag so that the compiler can optimise better for the
> kernel memory model.
>
I'll bring this up, well, just because. It was something I wanted
before, but I'm not sure how much of a benefit it will be without it
being actually implemented where we can test it.
What about assigning blocks of code to a section?
if (y) {
some_code;
} __attribute__((section("x")))
where the code "some_code" will be moved to that section. The use case
I'm thinking about is for trace points. The tracepoint code does inject
a bit of its own code at each tracepoint location (see
include/linux/tracepoint.h trace_##name()). It's under a
static_key_false() which is an unlikely, thus gcc does sometimes do
well to move it to the bottom of a function. But I'm wondering if it
would be better to get it into its own section all together? I'm just
worried about the icache hit where there are tracepoints in critical
sections.
-- Steve
prev parent reply other threads:[~2016-07-29 1:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-22 10:41 David Howells
2016-07-22 15:52 ` Christian Borntraeger
2016-07-22 15:59 ` David Woodhouse
2016-07-22 17:05 ` Christian Borntraeger
2016-07-22 17:17 ` James Bottomley
2016-07-22 17:33 ` David Woodhouse
2016-07-29 1:16 ` Steven Rostedt
2016-07-23 20:35 ` Benjamin Herrenschmidt
2016-07-23 23:09 ` Alexei Starovoitov
2016-07-25 18:49 ` Luis R. Rodriguez
2016-07-29 1:32 ` Steven Rostedt [this message]
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=20160728213219.5f26a404@grimm.local.home \
--to=rostedt@goodmis.org \
--cc=dhowells@redhat.com \
--cc=ksummit-discuss@lists.linuxfoundation.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