Skip to contentSkip to conversation

Athlon bug stomper. Pls apply.

PATCH Petr Vandrovec 9 participants 13 messages Sep 19, 2001 – Sep 21, 2001

lore
Share & tools
lore
#0 lore raw
Quoted 6 lines · Arjan van de Ven

Ok but that part is simple:

run

http://www.fenrus.demon.nl/athlon.c

Small question - is it OK that 'faster_copy' is faster than 'even_faster'? By only few percents, but... It is dual cpu Tyan, with two AMD MP 1.2MHz, with 1022:700C AMD hostbridge. I'll check KT133 at home if I'll remember...
Thanks,
Petr Vandrovec [email protected]

Athlon test program $Id: fast.c,v 1.6 2000/09/23 09:05:45 arjan Exp $ clear_page() tests
clear_page function 'warm up run' took 13967 cycles per page
clear_page function '2.4 non MMX' took 9298 cycles per page

clear_page function '2.4 MMX fallback'   took 9284 cycles per page
clear_page function '2.4 MMX version'    took 8508 cycles per page
clear_page function 'faster_clear_page'  took 4016 cycles per page
clear_page function 'even_faster_clear'  took 3916 cycles per page

copy_page() tests
copy_page function 'warm up run' took 15118 cycles per page
copy_page function '2.4 non MMX' took 17002 cycles per page
copy_page function '2.4 MMX fallback' took 16978 cycles per page
copy_page function '2.4 MMX version' took 15163 cycles per page
copy_page function 'faster_copy' took 8569 cycles per page
copy_page function 'even_faster' took 8805 cycles per page

#1 lore raw
Quoted 10 lines · Petr Vandrovec
Quoted 6 lines · Arjan van de Ven

Ok but that part is simple:

run

http://www.fenrus.demon.nl/athlon.c

Small question - is it OK that 'faster_copy' is faster than 'even_faster'?

Yeah; both are "new style" with a minor variation, "even_faster" is basically my test victim, and faster_ is the "last known good" one.

Quoted 3 lines
clear_page function '2.4 MMX version'    took 8508 cycles per page
clear_page function 'faster_clear_page'  took 4016 cycles per page
clear_page function 'even_faster_clear'  took 3916 cycles per page

Yup, > 2x improvement, that's expected

Quoted 5 lines

copy_page() tests
copy_page function '2.4 MMX version' took 15163 cycles per page
copy_page function 'faster_copy' took 8569 cycles per page
copy_page function 'even_faster' took 8805 cycles per page

same here

If it were only 5%, I would vote for disabling the optimisation given the number of problems; however it's 2x _and_ you can trigger the bug as normal user from userspace too... so we need to fix the hardware/bios.

Greetings,
Arjan van de Ven

#2 lore raw
Quoted 3 lines · Arjan van de Ven

If it were only 5%, I would vote for disabling the optimisation given the number of problems; however it's 2x _and_ you can trigger the bug as normal user from userspace too... so we need to fix the hardware/bios.

But we really dont know what the hell that bit is doing. It might trigger some other obscure bugs and make things a real mess.

Until we get some answer from VIA its IMHO a bad idea to start twiddling this bit willy-nilly on all machines.

-Dan

Signature · 1 line
[-] Omae no subete no kichi wa ore no mono da. [-]
#3 lore raw
Quoted 10 lines · Dan Hollis
Quoted 3 lines · Arjan van de Ven

If it were only 5%, I would vote for disabling the optimisation given the number of problems; however it's 2x _and_ you can trigger the bug as normal user from userspace too... so we need to fix the hardware/bios.

But we really dont know what the hell that bit is doing. It might trigger some other obscure bugs and make things a real mess.

Until we get some answer from VIA its IMHO a bad idea to start twiddling this bit willy-nilly on all machines.

That is the only way we can get information. We can twiddle this bit and run memory performance tests on machines that aren't affected and other stress tests on machines that are affected and see if we can see if stability is impacted.

Additionaly the motherboards could be instrumented, and we could see if there are any timing differences.

Of course VIA looking at what they have done and what that bit is supposed to be is easiest as they have the schemantics of those chips. But there is not reason to be limited to just that approach.

Eric

#4 lore raw
Quoted 3 lines · Eric W. Biederman

Of course VIA looking at what they have done and what that bit is supposed to be is easiest as they have the schemantics of those chips. But there is not reason to be limited to just that approach.

Testing it is ok, its rolling the "patch" into production kernels that im most concerned about.

What happens if the bit happens to fiddle with motherboard voltages and you end up destroying peoples hardware...

Until we have a straight answer what the hell this bit does, its a very bad idea to put it into *production kernel*.

We definitely need more data points too. So far we dont have any athlon.c data for kt133a with the bit on and off, only kt133.

-Dan

Signature · 1 line
[-] Omae no subete no kichi wa ore no mono da. [-]
#5 lore raw
Quoted 2 lines · Dan Hollis

We definitely need more data points too. So far we dont have any athlon.c data for kt133a with the bit on and off, only kt133.

My system is a kt133a, that show the bug. I have run a hundred tests, first in a Athlon optimized kernel with the patch (55.7=0) then with a non optimized kernel (55.7=1).

Here are some typical results:

K7 optimized:
Athlon test program $Id: fast.c,v 1.6 2000/09/23 09:05:45 arjan Exp $ clear_page() tests

clear_page function 'warm up run'        took 19862 cycles per page
clear_page function '2.4 non MMX'        took 12296 cycles per page
clear_page function '2.4 MMX fallback'   took 12068 cycles per page
clear_page function '2.4 MMX version'    took 14936 cycles per page
clear_page function 'faster_clear_page'  took 4393 cycles per page
clear_page function 'even_faster_clear'  took 4362 cycles per page

copy_page() tests

copy_page function 'warm up run'         took 22513 cycles per page
copy_page function '2.4 non MMX'         took 26280 cycles per page
copy_page function '2.4 MMX fallback'    took 26275 cycles per page
copy_page function '2.4 MMX version'     took 22537 cycles per page
copy_page function 'faster_copy'         took 10983 cycles per page
copy_page function 'even_faster'         took 11122 cycles per page

and here without:
Athlon test program $Id: fast.c,v 1.6 2000/09/23 09:05:45 arjan Exp $ clear_page() tests

clear_page function 'warm up run'        took 12871 cycles per page
clear_page function '2.4 non MMX'        took 12325 cycles per page
clear_page function '2.4 MMX fallback'   took 12586 cycles per page
clear_page function '2.4 MMX version'    took 12021 cycles per page
clear_page function 'faster_clear_page'  took 4401 cycles per page
clear_page function 'even_faster_clear'  took 4370 cycles per page

copy_page() tests

copy_page function 'warm up run'         took 19568 cycles per page
copy_page function '2.4 non MMX'         took 25353 cycles per page
copy_page function '2.4 MMX fallback'    took 25316 cycles per page
copy_page function '2.4 MMX version'     took 19541 cycles per page
copy_page function 'faster_copy'         took 11052 cycles per page
copy_page function 'even_faster'         took 10785 cycles per page

I thought that when I run the program in the non-optimized kernel with 55.7=1, the program was supposed to crash the system, but it doesn't seem to do. Isn't the program the K7 optimized fast_copy_page()? Weird.

--
Roberto Jung Drebes <[email protected]>
Porto Alegre, RS - Brasil
http://www.inf.ufrgs.br/~drebes/

#6 lore raw
In reply to Eric W. Biederman
Quoted 5 lines · Dan Hollis
Quoted 3 lines · Eric W. Biederman

Of course VIA looking at what they have done and what that bit is supposed to be is easiest as they have the schemantics of those chips. But there is not reason to be limited to just that approach.

Quoted 8 lines

Testing it is ok, its rolling the "patch" into production kernels that im most concerned about.

What happens if the bit happens to fiddle with motherboard voltages and you end up destroying peoples hardware...

Until we have a straight answer what the hell this bit does, its a very bad idea to put it into *production kernel*.

Of course the BIOS versions made exactly that change...

john

#7 lore raw
Quoted 3 lines · John Alvord
Quoted 2 lines

Until we have a straight answer what the hell this bit does, its a very bad idea to put it into *production kernel*.

Of course the BIOS versions made exactly that change...

1) We dont know if all "fixed" BIOS versions do it
2) We dont know if all motherboards do it
3) We dont have enough data points to determine if this is a "real fix" yet.
4) We dont know if they do it under all circumstances
(eg do they read SPD and set it in some situations and not others) It may even be CPU rev specific.

IMHO its *FAR* too premature to be rolling this into production kernels based on the scant evidence we have so far.

-Dan

Signature · 1 line
[-] Omae no subete no kichi wa ore no mono da. [-]
#8 lore raw

Agreed. Neither my KT133 (Asus A7V bios 1007) nor my KT133A (MSI K7T-Limited bios 2.8) exhibit the OOPS on boot problem. (For the record, both have 1 256 pc133 Infineon and 2 128 pc133 Infineons, 1GHz T-bird [stepping 02].)

---
Dan Chen [email protected]
GPG key: www.cs.unc.edu/~chenda/pubkey.gpg.asc

Quoted 11 lines · Dan Hollis

1) We dont know if all "fixed" BIOS versions do it
2) We dont know if all motherboards do it
3) We dont have enough data points to determine if this is a "real fix" yet.
4) We dont know if they do it under all circumstances
(eg do they read SPD and set it in some situations and not others) It may even be CPU rev specific.

IMHO its *FAR* too premature to be rolling this into production kernels based on the scant evidence we have so far.

-Dan

#9 lore raw
In reply to Dan Hollis

In article <[email protected]> you write:

| On Wed, 19 Sep 2001, Arjan van de Ven wrote:
| > If it were only 5%, I would vote for disabling the optimisation given the
| > number of problems; however it's 2x _and_ you can trigger the bug as normal
| > user from userspace too... so we need to fix the hardware/bios.
| 
| But we really dont know what the hell that bit is doing. It might trigger
| some other obscure bugs and make things a real mess.
| 
| Until we get some answer from VIA its IMHO a bad idea to start twiddling
| this bit willy-nilly on all machines.

We know one thing it's doing, keeping user programs from causing errors. If the error didn't occur in user mode I would be more careful, but having been shown that it does, I will use the fix. Since the older BIOS versions set it the other way, I'm willing to assume it's safe and move forward.

Signature · 4 lines
bill davidsen <[email protected]>
 "If I were a diplomat, in the best case I'd go hungry.  In the worst
  case, people would die."
		-- Robert Lipe
#10 lore raw
Quoted 5 lines · bill davidsen

We know one thing it's doing, keeping user programs from causing errors. If the error didn't occur in user mode I would be more careful, but having been shown that it does, I will use the fix. Since the older BIOS versions set it the other way, I'm willing to assume it's safe and move forward.

VIA's own KT133A chipset drivers dont seem to fiddle the bit though... On other VIA drivers eg MVP3 etc they DO fiddle bits.

-Dan

Signature · 1 line
[-] Omae no subete no kichi wa ore no mono da. [-]
#11 lore raw
In reply to Arjan van de Ven
Quoted 10 lines · Dan Hollis
Quoted 3 lines · Arjan van de Ven

If it were only 5%, I would vote for disabling the optimisation given the number of problems; however it's 2x _and_ you can trigger the bug as normal user from userspace too... so we need to fix the hardware/bios.

But we really dont know what the hell that bit is doing. It might trigger some other obscure bugs and make things a real mess.

Until we get some answer from VIA its IMHO a bad idea to start twiddling this bit willy-nilly on all machines.

no argument from me there...

#12 lore raw
In reply to Petr Vandrovec
Quoted 4 lines · Petr Vandrovec
Quoted 3 lines · Arjan van de Ven

Ok but that part is simple:

Quoted 8 lines
Quoted 3 lines

run

http://www.fenrus.demon.nl/athlon.c

Small question - is it OK that 'faster_copy' is faster than 'even_faster'? By only few percents, but... It is dual cpu Tyan, with two AMD MP 1.2MHz, with 1022:700C AMD hostbridge. I'll check KT133 at home if I'll remember...

Same here. In a quite number of cases, even_faster is actually slower. Not always, though. I suspect the measurement is not really exact.

Quoted 26 lines

Thanks,
Petr Vandrovec [email protected]

Athlon test program $Id: fast.c,v 1.6 2000/09/23 09:05:45 arjan Exp $ clear_page() tests
clear_page function 'warm up run' took 13967 cycles per page
clear_page function '2.4 non MMX' took 9298 cycles per page

clear_page function '2.4 MMX fallback'   took 9284 cycles per page
clear_page function '2.4 MMX version'    took 8508 cycles per page
clear_page function 'faster_clear_page'  took 4016 cycles per page
clear_page function 'even_faster_clear'  took 3916 cycles per page

copy_page() tests
copy_page function 'warm up run' took 15118 cycles per page
copy_page function '2.4 non MMX' took 17002 cycles per page
copy_page function '2.4 MMX fallback' took 16978 cycles per page
copy_page function '2.4 MMX version' took 15163 cycles per page
copy_page function 'faster_copy' took 8569 cycles per page
copy_page function 'even_faster' took 8805 cycles per page
-
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/

Signature · 2 lines
Vojtech Pavlik
SuSE Labs