From: "H. Peter Anvin" <hpa@zytor.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Kyle McMartin <kyle@infradead.org>, Ingo Molnar <mingo@elte.hu>,
Mikael Pettersson <mikpe@it.uu.se>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: "eliminate warn_on_slowpath()" change causes many gcc-3.2.3 warnings
Date: Sat, 17 Jan 2009 15:40:06 -0800 [thread overview]
Message-ID: <49726C56.6080905@zytor.com> (raw)
In-Reply-To: <alpine.LFD.2.00.0901181032350.3006@localhost.localdomain>
Linus Torvalds wrote:
>
> Don't do this. That just forces a load off a complex pointer instead, with
> no upsides. At least if it was
>
> extern const char warn_slowpath_nofmt[];
>
> it would only load the pointer itself, which is still a fairly expensive
> op, but at least doesn't require the extra memory load.
>
> But you'd be better off jusst making it something like
>
> #define NO_FMT ((const char *)(-1))
>
> instead, which is really much more obvious, and doesn't need any of that
> "get a pointer" overhead.
>
At least on x86, the two ops should be the same cost?
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
next prev parent reply other threads:[~2009-01-17 23:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-17 15:19 "eliminate warn_on_slowpath()" change causes many gcc-3.2.3 warnings Mikael Pettersson
2009-01-17 16:18 ` Ingo Molnar
2009-01-17 20:01 ` H. Peter Anvin
2009-01-17 20:44 ` Kyle McMartin
2009-01-17 20:57 ` Kyle McMartin
2009-01-17 21:07 ` H. Peter Anvin
2009-01-17 21:38 ` Kyle McMartin
2009-01-17 23:37 ` Linus Torvalds
2009-01-17 23:40 ` H. Peter Anvin [this message]
2009-01-18 0:01 ` Linus Torvalds
2009-01-18 0:10 ` H. Peter Anvin
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=49726C56.6080905@zytor.com \
--to=hpa@zytor.com \
--cc=kyle@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikpe@it.uu.se \
--cc=mingo@elte.hu \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.