linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: dean gaudet <dean-list-linux-kernel@arctic.org>
To: Zwane Mwaikambo <zwane@linuxpower.ca>
Cc: "Barry K. Nathan" <barryn@pobox.com>,
	Mikael Pettersson <mikpe@csd.uu.se>,
	linux-kernel@vger.kernel.org, lkml@kcore.org
Subject: Re: Pentium-M?
Date: Mon, 25 Aug 2003 21:09:33 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.53.0308252054480.15337@twinlark.arctic.org> (raw)
In-Reply-To: <Pine.LNX.4.53.0308231418070.15935@montezuma.fsmlabs.com>

On Sat, 23 Aug 2003, Zwane Mwaikambo wrote:

> On Sat, 23 Aug 2003, Barry K. Nathan wrote:
>
> > On Sat, Aug 23, 2003 at 09:03:17AM -0400, Zwane Mwaikambo wrote:
> > > That's interesting, intel compiler recommends P4 type optimisations,
> > > also worth noting that the P-M has hardware prefetch.
> >
> > I'm pretty sure the "Tualatin" Pentium III's also have hardware prefetch.
> > So it's not something specific to the P4 or P-M.

yeah tualatin has hw prefetch.  p-m can handle more streams than tualatin.


> Someone else (in concordance with Mikael) also pointed out that the
> cacheline size is also the same as the PIII and not P4. So it's best
> going for PIII optimisations. It's best ignoring my previous comment then.

P-M has a 64-byte L1 dcacheline size same as P4 -- p3 has only 32 bytes.
see <http://sandpile.org/impl/pm.htm> for example.  (it's possible to
prove it experimentally if you want :)  but i thought kernel cacheline
size stuff was only important for SMP locking alignments?

there's details regarding the differences between P-M and P4 in the latest
"P4 optimisation guide", which was document id 24896609 at
developer.intel.com last time i fetched it, it might have been rev'd since
then.

basically the main disadvantage to selecting P4 for kernel compiling on a
centrino is that P-M has the same complex-simple-simple (4-1-1) uop
decoding machinery as the entire P6 family line... whereas P4's trace
cache somewhat offsets the P4's decoder's quirks.  so stuff scheduled for
p4 may not produce the best complex-simple-simple sequence that a p6
family processor wants to see.  i'm not really sure how well gcc does in
either case though... (whereas icc does a stellar job.)

i bet intel is saying "optimise for p4" for two reasons:

(a) the reality is way too complex to describe
(b) p4 is their long-term bet and they'd rather code be targetted to it
    specifically

however, if/when gcc picks up some of the more wacked p4 optimisations,
such as turning multiplication by 32 into:

	add eax,eax
	add eax,eax
	add eax,eax
	add eax,eax
	add eax,eax

then you'll start to see penalties on p6 cores ... the p4 does not like
shifts or lea.  the above runs in 2.5 cycles on a p4 (double-pumped ALUs)
whereas a shift or lea would be 4 clocks.

-dean

  parent reply	other threads:[~2003-08-26  4:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-23 12:36 Pentium-M? Mikael Pettersson
2003-08-23 13:03 ` Pentium-M? Zwane Mwaikambo
2003-08-23 18:03   ` Pentium-M? Barry K. Nathan
2003-08-23 18:20     ` Pentium-M? Zwane Mwaikambo
2003-08-24 20:20       ` Pentium-M? Christian Axelsson
2003-08-26  4:09       ` dean gaudet [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-08-24 20:59 Pentium-M? Mikael Pettersson
2003-08-23 11:50 Pentium-M? Jan De Luyck
2003-08-23 12:00 ` Pentium-M? 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=Pine.LNX.4.53.0308252054480.15337@twinlark.arctic.org \
    --to=dean-list-linux-kernel@arctic.org \
    --cc=barryn@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkml@kcore.org \
    --cc=mikpe@csd.uu.se \
    --cc=zwane@linuxpower.ca \
    /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).