Re: [PATCH] 2.6 workaround for Athlon/Opteron prefetch errata

bill davidsen
2003-09-11T20:23:51Z

In article <20030911162421.419f4432.ak@suse.de>,
Andi Kleen <ak@suse.de> wrote:
| On Thu, 11 Sep 2003 15:14:02 +0100
| Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
|
| >
| > There is *one* change needed. We shouldnt call is_prefetch unless the
| > current CPU is an Athlon. That way its a performance improvement for
| > PIV, and Athlon in general, fixes the bug and causes no fancy athlon
| > fixup code for non AMD processors.
|
| I considered that when writing the patch, but: is_prefetch is a single byte
| memory access for something already in cache. Checking for an Athlon
| CPU needs two memory accesses in boot_cpu_data at least (checking vendor
| and model)

You are still missing the point, what's needed is not a better way to do
useless work, it's a way to avoid doing it at all. This code should only
be built for CPU's which need it, no accesses needed except in .config.
--
bill davidsen <davidsen@tmr.com>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.