From: Ralf Baechle <ralf@linux-mips.org>
To: Dominic Sweetman <dom@mips.com>
Cc: Greg Weeks <greg.weeks@timesys.com>, linux-mips@linux-mips.org
Subject: Re: memcpy prefetch
Date: Thu, 7 Apr 2005 15:05:07 +0100 [thread overview]
Message-ID: <20050407140507.GA4948@linux-mips.org> (raw)
In-Reply-To: <16981.10097.547098.639380@arsenal.mips.com>
On Thu, Apr 07, 2005 at 01:28:33PM +0100, Dominic Sweetman wrote:
> Greg Weeks (greg.weeks@timesys.com) writes:
>
> > What's the performance hit for doing a pref on a cache line that is
> > already pref'd? Does it turn into a nop, or do we get some horrible
> > degenerate case?
>
> The specification for the prefetch instruction is fairly wide, to
> permit different implementations to act differently. It's perfectly
> legal for it to be a no-op.
The R5000 series actually treats it as a nop - which is why Linux treats
the R5000 as a CPU that does not have prefetch.
> However, implementors are told that they
> should not do anything which would make performance *worse* than if it
> was a no-op.
Okay, but that should be obvious, I'd hope :-)
> > Are 64 bit processors always at least 32 byte cache line size?
>
> There's no reliable correlation. If you were to go round the
> "autogenerated at kernel-startup-time" route, then you can figure out
> the line size from the "Config" registers (MIPS32- or MIPS64-compliant
> CPUs) or from a table of CPU IDs or otherwise (earlier CPUs)...
Linux already contains a huge chunk of code to detect these and many
more cache properties for mips32, mips64 and more. We also try to make
sure the compiler can do constant folding etc. as far as possible for
a particular platform. All it takes is a suitable cpu-feature-overrides.h.
In absence of that Linux will built cache that pretty much support
everything in the universe - at some code bloat.
Ralf
prev parent reply other threads:[~2005-04-07 14:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-06 12:30 memcpy prefetch Greg Weeks
2005-04-06 20:08 ` Ralf Baechle
2005-04-07 12:14 ` Greg Weeks
2005-04-07 12:25 ` Ralf Baechle
2005-04-07 12:25 ` Michael Uhler
2005-04-07 12:25 ` Michael Uhler
2005-04-07 12:28 ` Dominic Sweetman
2005-04-07 14:05 ` Ralf Baechle [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=20050407140507.GA4948@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=dom@mips.com \
--cc=greg.weeks@timesys.com \
--cc=linux-mips@linux-mips.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