2008-08-08 20:03:52

by CIJOML

[permalink] [raw]
Subject: PATCH: enable PAT at Pentium M 1.7 GHz

Hi there,

Sending oneliner enabling PAT at my Pentium M 1.7 GHz CPU. It simply works.
Thanks for inclusion:

--- linux-2.6.26.2/arch/x86/kernel/cpu/addon_cpuid_features.c
2008-08-08 21:52:20.000000000 +0200
+++ linux-2.6.26.2/arch/x86/kernel/cpu/addon_cpuid_features.c 2008-08-08
21:41:17.000000000 +0200
@@ -59,7 +59,7 @@
return;
break;
case X86_VENDOR_INTEL:
- if (c->x86 == 0xF || (c->x86 == 6 && c->x86_model >= 15))
+ if (c->x86 == 0xF || (c->x86 == 6 && c->x86_model >= 13))
return;
break;
}

Listik:/usr/src# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 13
model name : Intel(R) Pentium(R) M processor 1.70GHz
stepping : 6
cpu MHz : 600.000
cache size : 2048 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr mce cx8 apic sep mtrr pge mca cmov
pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe bts est tm2
bogomips : 1200.47
clflush size : 64
power management:


before:
Aug 8 19:08:27 Listik kernel: PAT disabled. Not yet verified on this CPU
type.


after:
Aug 8 21:43:34 Listik kernel: x86 PAT enabled: cpu 0, old 0x7040600070406,
new 0x7010600070106

Bye

Michal


2008-08-08 20:54:22

by H. Peter Anvin

[permalink] [raw]
Subject: Re: PATCH: enable PAT at Pentium M 1.7 GHz

CIJOML wrote:
> Hi there,
> Sending oneliner enabling PAT at my Pentium M 1.7 GHz CPU. It simply works.

That's not really the right way to do that. Unfortunately the likely
failure scenario is "data corruption after a month of uptime." Thus, we
really need someone to review the relevant errata; I believe Venki is
planning to do so.

-hpa

2008-08-09 04:24:17

by CIJOML

[permalink] [raw]
Subject: Re: PATCH: enable PAT at Pentium M 1.7 GHz

H. Peter Anvin writes:

> CIJOML wrote:
>> Hi there,
>> Sending oneliner enabling PAT at my Pentium M 1.7 GHz CPU. It simply
>> works.
>
> That's not really the right way to do that. Unfortunately the likely
> failure scenario is "data corruption after a month of uptime." Thus, we
> really need someone to review the relevant errata; I believe Venki is
> planning to do so.
>
> -hpa

Well the truth is, that I use this little tweak from 2.6.26-rc and first cpu
having PAT was P3 XEON. And because Intel has backward compatibility, it is
safe to use it.
I don't have any problem with loosing data or any suspend/resume problems
with this.

Reference:
http://safari.ibmpressbooks.com/032124656X/ch32

Best regards

Michal

2008-08-09 04:34:17

by H. Peter Anvin

[permalink] [raw]
Subject: Re: PATCH: enable PAT at Pentium M 1.7 GHz

CIJOML wrote:
>
> Well the truth is, that I use this little tweak from 2.6.26-rc and first
> cpu having PAT was P3 XEON. And because Intel has backward
> compatibility, it is safe to use it.
> I don't have any problem with loosing data or any suspend/resume
> problems with this.

Sorry, it doesn't work that simple. There are lots of errata in CPUs,
and data loss is too critical.

You're of course welcome to run whatever you want on your machine, but
we have to be more careful.

-hpa

2008-08-11 23:30:27

by Pallipadi, Venkatesh

[permalink] [raw]
Subject: RE: PATCH: enable PAT at Pentium M 1.7 GHz



>-----Original Message-----
>From: [email protected]
>[mailto:[email protected]] On Behalf Of H. Peter Anvin
>Sent: Friday, August 08, 2008 9:34 PM
>To: CIJOML
>Cc: [email protected]; [email protected]; [email protected]
>Subject: Re: PATCH: enable PAT at Pentium M 1.7 GHz
>
>CIJOML wrote:
>>
>> Well the truth is, that I use this little tweak from
>2.6.26-rc and first
>> cpu having PAT was P3 XEON. And because Intel has backward
>> compatibility, it is safe to use it.
>> I don't have any problem with loosing data or any suspend/resume
>> problems with this.
>
>Sorry, it doesn't work that simple. There are lots of errata in CPUs,
>and data loss is too critical.
>
>You're of course welcome to run whatever you want on your machine, but
>we have to be more careful.
>

Yes. I am looking through the errata list to enable PAT on known to be good CPUs.

Unfortunately, system works fine with PAT enabled may not mean much right now.
As there are really no significant users of PAT yet. We have PAT WC enabled in
The kernel and PAT APIs exported for the drivers to use. But, unless there are
very many drivers using these PAT APIs we will not really hit the erratas for
the CPUs. Even after that, erratas are like corner cases which does not really
happen very often. So, it is best to go by the published errata list and to
disable PAT where there are known problems.

Thanks,
Venki