Subject: 2.4.20 amd speculative caching

I have recently upgraded to an AMD processor that is exhibiting the
problems with the AMD speculative caching bug. Kernel 2.4.19 seems to
fix the problem with the temporary work-around (adv-spec-cache patch). I
have noticed that the patch has been removed from 2.4.20 and I am
wondering if there is some other mechanism that is supposed to address
this issue. Currently I have a 2.4.20 kernel with same configuration as
my 2.4.19 and the problem seems to have reappeared.
Thanks for any information.
(please CC my address on reply)
Craig Sowadski ([email protected])


2003-02-19 17:43:31

by Andi Kleen

[permalink] [raw]
Subject: Re: 2.4.20 amd speculative caching

"Sowadski, Craig Harold (UMR-Student)" <[email protected]> writes:

> I have recently upgraded to an AMD processor that is exhibiting the
> problems with the AMD speculative caching bug. Kernel 2.4.19 seems to

It's actually not an AMD bug, but an Linux bug that assumed undefined x86
behaviour to behave well.

> fix the problem with the temporary work-around (adv-spec-cache patch). I
> have noticed that the patch has been removed from 2.4.20 and I am
> wondering if there is some other mechanism that is supposed to address
> this issue. Currently I have a 2.4.20 kernel with same configuration as

Yes, there is a new mechanism to address the problem the adv-spec-cache
patch solved. It enforces that there are not conflicting cache attributes
for memory mappings.

> my 2.4.19 and the problem seems to have reappeared.

What problem exactly? And does mem=nopentium help ?

-Andi

Subject: RE: 2.4.20 amd speculative caching

Sorry, I didn't mean to state that the bug was in the processor.

The systems consistently hard locks in any accelerated application. The
mem=nopentium does not seem to help at all.

Are there any dependencies that must be taken care of to implement the
new fix? Also, should I be seeing any dmesg output from this new
implementation?

Are there any debugging techniques I could use to track the cause? (I
have no log outputs due to hard lock)

If it helps, here is my hardware config:

AMD Duron 1300MHZ
MSI K7T Turbo-2
ATI Radeon 7500 w/64mb
Redhat 8.0
Thanks again for any information,

Craig Sowadski ([email protected])


-----Original Message-----
From: Andi Kleen [mailto:[email protected]]
Sent: Wednesday, February 19, 2003 11:54 AM
To: Sowadski, Craig Harold (UMR-Student)
Cc: [email protected]
Subject: Re: 2.4.20 amd speculative caching

"Sowadski, Craig Harold (UMR-Student)" <[email protected]> writes:

> I have recently upgraded to an AMD processor that is exhibiting the
> problems with the AMD speculative caching bug. Kernel 2.4.19 seems to

It's actually not an AMD bug, but an Linux bug that assumed undefined
x86
behaviour to behave well.

> fix the problem with the temporary work-around (adv-spec-cache patch).
I
> have noticed that the patch has been removed from 2.4.20 and I am
> wondering if there is some other mechanism that is supposed to address
> this issue. Currently I have a 2.4.20 kernel with same configuration
as

Yes, there is a new mechanism to address the problem the adv-spec-cache
patch solved. It enforces that there are not conflicting cache
attributes
for memory mappings.

> my 2.4.19 and the problem seems to have reappeared.

What problem exactly? And does mem=nopentium help ?

-Andi

2003-02-20 16:30:49

by Dave Jones

[permalink] [raw]
Subject: Re: 2.4.20 amd speculative caching

On Wed, Feb 19, 2003 at 01:13:28PM -0600, Sowadski, Craig Harold (UMR-Student) wrote:

> If it helps, here is my hardware config:
>
> AMD Duron 1300MHZ
> MSI K7T Turbo-2
> ATI Radeon 7500 w/64mb
> Redhat 8.0

Are you using the ATi firegl drivers ? If so, thats likely the
problem. (They ship an agpgart based upon 2.4.16 which lacks
the fixes needed).

Dave

--
| Dave Jones. http://www.codemonkey.org.uk
| SuSE Labs

2003-02-20 16:47:20

by Randal, Phil

[permalink] [raw]
Subject: RE: 2.4.20 amd speculative caching

According to Richard Brunner of AMD's email to the list dated June 11, 2002,
the cache attribute bug only affected Athlon XPs and MPs, so that can't be
the problem here, can it?

Cheers,

Phil

---------------------------------------------
Phil Randal
Network Engineer
Herefordshire Council
Hereford, UK

> -----Original Message-----
> From: Dave Jones [mailto:[email protected]]
> Sent: 20 February 2003 16:53
> To: Sowadski, Craig Harold (UMR-Student)
> Cc: Andi Kleen; [email protected]
> Subject: Re: 2.4.20 amd speculative caching
>
>
> On Wed, Feb 19, 2003 at 01:13:28PM -0600, Sowadski, Craig
> Harold (UMR-Student) wrote:
>
> > If it helps, here is my hardware config:
> >
> > AMD Duron 1300MHZ
> > MSI K7T Turbo-2
> > ATI Radeon 7500 w/64mb
> > Redhat 8.0
>
> Are you using the ATi firegl drivers ? If so, thats likely the
> problem. (They ship an agpgart based upon 2.4.16 which lacks
> the fixes needed).
>
> Dave
>
> --
> | Dave Jones. http://www.codemonkey.org.uk
> | SuSE Labs
> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

2003-02-20 16:57:33

by Alastair Stevens

[permalink] [raw]
Subject: Re: 2.4.20 amd speculative caching

> According to Richard Brunner of AMD's email to the list dated June 11,
> 2002, the cache attribute bug only affected Athlon XPs and MPs, so
> that can't be the problem here, can it?

I think it can - I believe Durons > 1GHz use the "Palomino" core (just
with less cache), so they would have the same issues as the Athlon XP.
Earlier Durons used the "Thunderbird" core if I remember rightly.

Cheers
Alastair

Subject: RE: 2.4.20 amd speculative caching

AMD's website has some documentation that says the morgan core durons
are affected.

http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/
26698.pdf

I am using only stock linus kernel driver for the agpgart and radeon.
Also, the system has now started locking up with 2.4.19 so I installed
WINDOWS (sorry) to see if it showed similar problems and it did (even
with the win2000 agp update). I have swaped the PS, RAM, and video card
with the same problems. I plan on swapping the MB with an identical
replacement to see if that helps. I will let you know if I conclude it
to be a hardware or software problem when I get some more parts to swap.
Sorry for bothering with what might be a hardware problem.

Thanks for all the help!!
Craig Sowadski ([email protected])


-----Original Message-----
From: Randal, Phil [mailto:[email protected]]
Sent: Thursday, February 20, 2003 10:50 AM
To: Sowadski, Craig Harold (UMR-Student)
Cc: [email protected]
Subject: RE: 2.4.20 amd speculative caching

According to Richard Brunner of AMD's email to the list dated June 11,
2002,
the cache attribute bug only affected Athlon XPs and MPs, so that can't
be
the problem here, can it?

Cheers,

Phil

---------------------------------------------
Phil Randal
Network Engineer
Herefordshire Council
Hereford, UK

> -----Original Message-----
> From: Dave Jones [mailto:[email protected]]
> Sent: 20 February 2003 16:53
> To: Sowadski, Craig Harold (UMR-Student)
> Cc: Andi Kleen; [email protected]
> Subject: Re: 2.4.20 amd speculative caching
>
>
> On Wed, Feb 19, 2003 at 01:13:28PM -0600, Sowadski, Craig
> Harold (UMR-Student) wrote:
>
> > If it helps, here is my hardware config:
> >
> > AMD Duron 1300MHZ
> > MSI K7T Turbo-2
> > ATI Radeon 7500 w/64mb
> > Redhat 8.0
>
> Are you using the ATi firegl drivers ? If so, thats likely the
> problem. (They ship an agpgart based upon 2.4.16 which lacks
> the fixes needed).
>
> Dave
>
> --
> | Dave Jones. http://www.codemonkey.org.uk
> | SuSE Labs
> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

2003-02-22 00:01:28

by Brunner, Richard

[permalink] [raw]
Subject: RE: 2.4.20 amd speculative caching

The best and reliable way to go is by the output of CPUID
(or cat /proc/cpuinfo)

if (((family == 6) && (model >= 6)) || (family == 15)) {
printk(KERN_INFO "Advanced speculative caching feature present\n");
return 1;
}

If your AMD processor meets the above CPUID family and model, then
you need the patch. The decoder ring from any random
Product name to CPUID family and model number is not yet available ;-)

-Rich ...
[richard brunner amd.com -- AMD]
[Senior Member, Technical Staff]

> -----Original Message-----
> From: Randal, Phil [mailto:[email protected]]
> Sent: Thursday, February 20, 2003 8:50 AM
> To: Sowadski, Craig Harold (UMR-Student)
> Cc: [email protected]
> Subject: RE: 2.4.20 amd speculative caching
>
>
> According to Richard Brunner of AMD's email to the list dated
> June 11, 2002,
> the cache attribute bug only affected Athlon XPs and MPs, so
> that can't be
> the problem here, can it?
>
> Cheers,
>
> Phil
>
> ---------------------------------------------
> Phil Randal
> Network Engineer
> Herefordshire Council
> Hereford, UK
>
> > -----Original Message-----
> > From: Dave Jones [mailto:[email protected]]
> > Sent: 20 February 2003 16:53
> > To: Sowadski, Craig Harold (UMR-Student)
> > Cc: Andi Kleen; [email protected]
> > Subject: Re: 2.4.20 amd speculative caching
> >
> >
> > On Wed, Feb 19, 2003 at 01:13:28PM -0600, Sowadski, Craig
> > Harold (UMR-Student) wrote:
> >
> > > If it helps, here is my hardware config:
> > >
> > > AMD Duron 1300MHZ
> > > MSI K7T Turbo-2
> > > ATI Radeon 7500 w/64mb
> > > Redhat 8.0
> >
> > Are you using the ATi firegl drivers ? If so, thats likely the
> > problem. (They ship an agpgart based upon 2.4.16 which lacks
> > the fixes needed).
> >
> > Dave
> >
> > --
> > | Dave Jones. http://www.codemonkey.org.uk
> > | SuSE Labs
> > -
> > To unsubscribe from this list: send the line "unsubscribe
> > linux-kernel" in
> > the body of a message to [email protected]
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
> >
> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

2003-02-22 05:15:27

by Andi Kleen

[permalink] [raw]
Subject: Re: 2.4.20 amd speculative caching

[email protected] writes:

> The best and reliable way to go is by the output of CPUID
> (or cat /proc/cpuinfo)
>
> if (((family == 6) && (model >= 6)) || (family == 15)) {
> printk(KERN_INFO "Advanced speculative caching feature present\n");
> return 1;
> }
>
> If your AMD processor meets the above CPUID family and model, then
> you need the patch. The decoder ring from any random
> Product name to CPUID family and model number is not yet available ;-)
>
When you have such a CPU you either need the old patch or the new patch
for change_page_attr which is in since 2.4.20 and fixes the underlying
bug of linux using conflicting cache attributes. The change_page_attr
solution is much faster because it doesn't prevent the kernel from
using 4MB pages (= less tlb misses) and also of course because it won't
cripple your CPU by disabling hardware prefetch.

However when the change_page_attr() approach is used you need to make
sure that the the agpgart driver that comes with the kernel is used
(which actually calls change_page_attr). Unfortunately it looks like
some versions of the ATI binary 3d driver install their own agpgart driver
and they don't have the change_page_attr() fixes.

So when you use the ATI driver with 2.4.20+ you need to make sure you
don't use their agpgart driver. Better would be to get ATI to fix their
agpgart included or better not ship an own agpgart at all for these
kernels.

Really there isn't much the linux kernel can do about third
party vendors replacing working included drivers with buggy own drivers.

If someone has contacts at ATI it would be good to ask them
to release a new driver with this issue fixed.

-Andi

Subject: RE: 2.4.20 amd speculative caching

It's seems that I was experiencing hardware problems. I swapped
everything on to a new board and it worked fine. The weird thing is that
I swapped everything back and the old board now works fine now as well!
It is hard for me to imagine that reseating everything fixed it, because
I did that multiple times before.
Thanks for all the help!
Craig ([email protected])


-----Original Message-----
From: Sowadski, Craig Harold (UMR-Student)
Sent: Thursday, February 20, 2003 12:49 PM
To: Sowadski, Craig Harold (UMR-Student)
Cc: [email protected]
Subject: RE: 2.4.20 amd speculative caching

AMD's website has some documentation that says the morgan core durons
are affected.

http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/
26698.pdf

I am using only stock linus kernel driver for the agpgart and radeon.
Also, the system has now started locking up with 2.4.19 so I installed
WINDOWS (sorry) to see if it showed similar problems and it did (even
with the win2000 agp update). I have swaped the PS, RAM, and video card
with the same problems. I plan on swapping the MB with an identical
replacement to see if that helps. I will let you know if I conclude it
to be a hardware or software problem when I get some more parts to swap.
Sorry for bothering with what might be a hardware problem.

Thanks for all the help!!
Craig Sowadski ([email protected])


-----Original Message-----
From: Randal, Phil [mailto:[email protected]]
Sent: Thursday, February 20, 2003 10:50 AM
To: Sowadski, Craig Harold (UMR-Student)
Cc: [email protected]
Subject: RE: 2.4.20 amd speculative caching

According to Richard Brunner of AMD's email to the list dated June 11,
2002,
the cache attribute bug only affected Athlon XPs and MPs, so that can't
be
the problem here, can it?

Cheers,

Phil

---------------------------------------------
Phil Randal
Network Engineer
Herefordshire Council
Hereford, UK

> -----Original Message-----
> From: Dave Jones [mailto:[email protected]]
> Sent: 20 February 2003 16:53
> To: Sowadski, Craig Harold (UMR-Student)
> Cc: Andi Kleen; [email protected]
> Subject: Re: 2.4.20 amd speculative caching
>
>
> On Wed, Feb 19, 2003 at 01:13:28PM -0600, Sowadski, Craig
> Harold (UMR-Student) wrote:
>
> > If it helps, here is my hardware config:
> >
> > AMD Duron 1300MHZ
> > MSI K7T Turbo-2
> > ATI Radeon 7500 w/64mb
> > Redhat 8.0
>
> Are you using the ATi firegl drivers ? If so, thats likely the
> problem. (They ship an agpgart based upon 2.4.16 which lacks
> the fixes needed).
>
> Dave
>
> --
> | Dave Jones. http://www.codemonkey.org.uk
> | SuSE Labs
> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>