From: "J.A. Magallon" <jamagallon@able.es>
To: "Joseph D. Wagner" <theman@josephdwagner.info>
Cc: linux-kernel@vger.kernel.org
Subject: Re: FEATURE REQUEST: Specific Processor Optimizations on x86 Architecture
Date: Fri, 24 Oct 2003 01:05:42 +0200 [thread overview]
Message-ID: <20031023230542.GC2084@werewolf.able.es> (raw)
In-Reply-To: <200310221855.15925.theman@josephdwagner.info> (from theman@josephdwagner.info on Wed, Oct 22, 2003 at 14:55:15 +0200)
[-- Attachment #1: Type: text/plain, Size: 2310 bytes --]
On 10.22, Joseph D. Wagner wrote:
> Yes, I know you can select Pentium III, Pentium 4, Athlon, etc, under
> processor type when doing a 'make xconfig', but those selections do not
> translate into the appropriate -mcpu and -march flags.
>
> While the kernel on x86 architecture can be optimized in terms of generic
> processor specifications (i.e. i386, i486, i586, i686), the kernel can't be
> optimized beyond a i686.
>
> If you select Pentium III, the -march flag is set to i686.
> If you select Pentium 4, the -march flag is set to i686.
> If you select Athlon 4, the -march flag is set to i686.
> If you select Athlon XP, the -march flag is set to i686.
>
> It should be that...
>
> If you select Pentium III, the -march flag is set to pentium3.
> If you select Pentium 4, the -march flag is set to pentium4.
> If you select Athlon 4, the -march flag is set to athlon-4.
> If you select Athlon XP, the -march flag is set to athlon-xp.
>
> I don't want to have to hand edit the makefiles just to optimize my kernel.
> I think this change is simple enough to do, and would allow kernel
> developers the option of processor-specific optimizations in the future.
>
> TIA.
>
> Joseph D. Wagner
I have sent the attached patches sometimes to the list/Marcelo, and they
have been rejected to the moment because:
- gcc can spit some new instructions, reorganize code and other things when
you jump from i686 to pentium3, for example.
- There can be bugs both in gcc and in the kernel that can be triggered by
>i686 optimizations/code.
- This is not safe for a stable kernel, it was done in 2.5, bugs appeared,
were corrected, and so on, 'cause this was a development kernel.
BTW, I use this regularly, and have not found any bugs, but I admit it is
unsafe. I also advocate for a pII split (I use a dual PII ;).
There are some other specific code that could be used in the kernel,
for example mb() and so on can be implemented with {m,s,l}fence in p3/p4
processors, instead of the old 'lock; insn' (attached also).
--
J.A. Magallon <jamagallon()able!es> \ Software is like sex:
werewolf!able!es \ It's better when it's free
Mandrake Linux release 9.2 (Cooker) for i586
Linux 2.4.23-pre7-jam2 (gcc 3.3.1 (Mandrake Linux 9.2 3.3.1-2mdk))
[-- Attachment #2: 22-x86-mb.bz2 --]
[-- Type: application/x-bzip, Size: 826 bytes --]
next prev parent reply other threads:[~2003-10-23 23:06 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-22 12:55 FEATURE REQUEST: Specific Processor Optimizations on x86 Architecture Joseph D. Wagner
2003-10-23 0:12 ` Måns Rullgård
2003-10-22 13:26 ` Joseph D. Wagner
2003-10-23 0:37 ` Michael Rozhavsky
2003-10-23 0:15 ` Dave Jones
2003-10-22 13:47 ` Joseph D. Wagner
2003-10-23 1:02 ` Rik van Riel
2003-10-23 1:14 ` Joseph D. Wagner
2003-10-23 1:18 ` Rik van Riel
2003-10-23 9:26 ` Jan-Benedict Glaw
2003-10-23 9:35 ` Måns Rullgård
2003-10-23 1:06 ` Tim Hockin
2003-10-22 15:40 ` Joseph D. Wagner
2003-10-23 14:57 ` Rik van Riel
2003-10-23 1:23 ` Dave Jones
2003-10-22 15:35 ` Joseph D. Wagner
2003-10-23 2:52 ` William Lee Irwin III
2003-10-23 9:35 ` Jan-Benedict Glaw
2003-10-23 13:40 ` Jesse Pollard
2003-10-23 14:57 ` Charles Cazabon
2003-10-23 15:34 ` David Zaffiro
2003-10-23 17:26 ` Rob
2003-10-23 23:05 ` J.A. Magallon [this message]
2003-10-23 23:24 ` Nick Piggin
[not found] ` <200310241301.41230.ioe-lkml@rameria.de>
2003-10-27 15:20 ` J.A. Magallon
2003-10-27 20:52 ` Zwane Mwaikambo
[not found] <JB3R.23s.23@gated-at.bofh.it>
[not found] ` <JBn4.2xt.19@gated-at.bofh.it>
[not found] ` <JBPW.36x.3@gated-at.bofh.it>
2003-10-23 8:32 ` Ihar 'Philips' Filipau
2003-10-23 8:37 ` Ihar 'Philips' Filipau
[not found] ` <JWKQ.7nS.15@gated-at.bofh.it>
[not found] ` <LhtX.bs.15@gated-at.bofh.it>
[not found] ` <LhtX.bs.13@gated-at.bofh.it>
2003-10-27 18:33 ` Andi Kleen
2003-10-27 21:05 ` Zwane Mwaikambo
[not found] <JB3R.23s.23@gated-at.bofh.it.suse.lists.linux.kernel>
[not found] ` <JWKQ.7nS.15@gated-at.bofh.it.suse.lists.linux.kernel>
[not found] ` <LhtX.bs.15@gated-at.bofh.it.suse.lists.linux.kernel>
[not found] ` <LhtX.bs.13@gated-at.bofh.it.suse.lists.linux.kernel>
[not found] ` <m3k76qsf8i.fsf@averell.firstfloor.org.suse.lists.linux.kernel>
[not found] ` <Pine.LNX.4.53.0310271603580.21953@montezuma.fsmlabs.com.suse.lists.linux.kernel>
2003-10-27 21:15 ` Andi Kleen
2003-11-18 14:28 ` Zwane Mwaikambo
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=20031023230542.GC2084@werewolf.able.es \
--to=jamagallon@able.es \
--cc=linux-kernel@vger.kernel.org \
--cc=theman@josephdwagner.info \
/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;
as well as URLs for NNTP newsgroup(s).