From: Kerin Millar <kerframil@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: Noob question. Why is the for-pentium4 kernel built with -march=i686 ?
Date: Wed, 20 Jul 2005 09:03:25 +0100 [thread overview]
Message-ID: <pan.2005.07.20.08.03.25.15476@gmail.com> (raw)
In-Reply-To: 1121798151.15700.9.camel@home.yosifov.net
On Tue, 19 Jul 2005 21:35:51 +0300, Ivan Yosifov wrote:
<snip>
> -march implies -mtune and also implies thing like -msse2 for the
> instruction set where applicable.
> I think -march=pentium4 is equivalent to -mmmx -msse -msse2
> -mtune=pentium4 ( if I have not fogotten anything ).
> Pentium4 supports things like sse2 and mmx which AFAIK plain i686 does
> not. I first thought that maybe the kernel was destabilized by such
> optimizations, but k8 has all of them and more ( sse3 ).
> So, if it is ok to build the k8 kernel with -march=k8 why is it not ok
> to built the p4 kernel with -march=pentium4 ?
> I may be wrong, but any way I think of it it looks like a performance
> hit to build a p4 kernel with -march=i686.
>
Well, it may seem logical to think that but proving it is another matter
entirely. The flags that you refer to (-mmmx, -msse and -msse2) enable
support for vector extensions through various built-in functions. But this
does not necessarily mean that the code is somehow transformed to make use
of these functions, nor that the compiler decides to makes effective use
of these extensions via the optimisation process. As far as I'm aware,
only >=gcc-4.0 has support for auto-vectorisation although I am not
certain as to how effective it is. Jakub Jellinek has some wise words to
say on the topic in general:
https://www.redhat.com/archives/fedora-devel-list/2005-January/msg00742.html
Where genuine performance tests are conducted the results are not always
in accordance with what one might expect. Only hours ago I was reading a
LFS thread where someone had noted poorer performance using the "prescott"
target as opposed to "i386" for example. That Red Hat also choose to use
-march=i386 is interesting (as noted in the link above, with the exception
of the kernel and glibc) ...
Also, I believe that the -march=pentium4 option /was/ actually used up
until kernel 2.6.10 where it was dropped because of a risk that some
versions of gcc would cause the kernel to use SSE registers for data
movement (which is a no-no).
Cheers,
--Kerin Millar
next prev parent reply other threads:[~2005-07-20 7:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-19 17:07 Noob question. Why is the for-pentium4 kernel built with -march=i686 ? Ivan Yosifov
2005-07-19 17:52 ` Jan Engelhardt
2005-07-19 18:35 ` Ivan Yosifov
2005-07-20 8:03 ` Kerin Millar [this message]
2005-07-20 7:57 ` Jan Engelhardt
2005-07-20 8:23 ` Ivan Yosifov
2005-07-20 9:21 ` Jan Engelhardt
2005-07-20 9:44 ` Kerin Millar
2005-07-20 9:25 ` Ivan Yosifov
2005-07-20 10:38 ` Denis Vlasenko
2005-07-20 11:33 ` Ivan Yosifov
2005-07-20 11:42 ` Simon Strandman
2005-07-20 14:29 ` Dave Neuer
[not found] <4s3M3-ph-15@gated-at.bofh.it>
[not found] ` <4s4y2-Rt-17@gated-at.bofh.it>
[not found] ` <4s5aD-1sw-3@gated-at.bofh.it>
2005-07-19 20:12 ` Bodo Eggert
2005-07-19 20:15 ` Jan Engelhardt
2005-07-19 20:19 ` Lee Revell
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=pan.2005.07.20.08.03.25.15476@gmail.com \
--to=kerframil@gmail.com \
--cc=linux-kernel@vger.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