public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* PATCH: Recognize Tualatin cache size in 2.4.x
@ 2002-11-17 15:55 Ricardo Galli
  2002-11-18 19:02 ` Dave Jones
  0 siblings, 1 reply; 11+ messages in thread
From: Ricardo Galli @ 2002-11-17 15:55 UTC (permalink / raw)
  To: linux-kernel, marcelo

Marcelo,
	please attach this patch to recognise the Tualatin processors' 
cache. 

I think this has been already discussed in the list, and DaveJ 
also applied it in his tree and/or 2.5.x. It is documented by
Intel.

Regards

--
  ricardo galli    GPG id C8114D34

--- /usr/src/linux-2.4.20-rc1/arch/i386/kernel/setup.c	2002-11-05 2002-11-17 16:46:32.000000000 +0100
+++ /usr/src/linux-2.4.20-rc1a/arch/i386/kernel/setup.c	2002-11-05 00:52:25.000000000 +0100
@@ -2215,6 +2215,7 @@
 	{ 0x7B, LVL_2,      512 },
 	{ 0x7C, LVL_2,      1024 },
 	{ 0x82, LVL_2,      256 },
+	{ 0x83, LVL_2,      512 },
 	{ 0x84, LVL_2,      1024 },
 	{ 0x85, LVL_2,      2048 },
 	{ 0x00, 0, 0}



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: PATCH: Recognize Tualatin cache size in 2.4.x
  2002-11-17 15:55 PATCH: Recognize Tualatin cache size in 2.4.x Ricardo Galli
@ 2002-11-18 19:02 ` Dave Jones
  2002-11-18 20:54   ` Ricardo Galli
  0 siblings, 1 reply; 11+ messages in thread
From: Dave Jones @ 2002-11-18 19:02 UTC (permalink / raw)
  To: Ricardo Galli; +Cc: linux-kernel, marcelo

On Sun, Nov 17, 2002 at 04:55:22PM +0100, Ricardo Galli wrote:
 > Marcelo,
 > 	please attach this patch to recognise the Tualatin processors' 
 > cache. 
 > 
 > I think this has been already discussed in the list, and DaveJ 
 > also applied it in his tree and/or 2.5.x. It is documented by
 > Intel.

I sent Marcelo a patch containing this and other IDs.
He wants to take it for .21pre1

It's purely cosmetic, so that's fine with me..

		Dave

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: PATCH: Recognize Tualatin cache size in 2.4.x
  2002-11-18 19:02 ` Dave Jones
@ 2002-11-18 20:54   ` Ricardo Galli
  2002-11-19 12:08     ` Dave Jones
  0 siblings, 1 reply; 11+ messages in thread
From: Ricardo Galli @ 2002-11-18 20:54 UTC (permalink / raw)
  To: Dave Jones; +Cc: linux-kernel, marcelo

On Monday 18 November 2002 20:02, Dave Jones shaped the electrons to shout:
> On Sun, Nov 17, 2002 at 04:55:22PM +0100, Ricardo Galli wrote:
>  > Marcelo,
>  > 	please attach this patch to recognise the Tualatin processors'
>  > cache.
>  >
>  > I think this has been already discussed in the list, and DaveJ
>  > also applied it in his tree and/or 2.5.x. It is documented by
>  > Intel.
>
> I sent Marcelo a patch containing this and other IDs.
> He wants to take it for .21pre1
>
> It's purely cosmetic, so that's fine with me..

It's very cosmetic but very annoying for P3 > 1GHz, where Linux <= 2.4.20-preX 
only reports 32 KB of cache and it also seems to ignore the "cachesize" 
parameter. Perhaps it really uses 256KB, but not sure.

I tested it in a Compaq Proliant 330ML-G2 (P3 1.4) and a kernel compilation is 
100% faster if the patch is applied.

Regards, 

PS: Dave, see you in Mallorca in 20 days :-)

-- 
  ricardo galli       GPG id C8114D34


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: PATCH: Recognize Tualatin cache size in 2.4.x
  2002-11-18 20:54   ` Ricardo Galli
@ 2002-11-19 12:08     ` Dave Jones
  2002-11-20 20:03       ` Stephan von Krawczynski
  0 siblings, 1 reply; 11+ messages in thread
From: Dave Jones @ 2002-11-19 12:08 UTC (permalink / raw)
  To: Ricardo Galli; +Cc: linux-kernel, marcelo

On Mon, Nov 18, 2002 at 09:54:52PM +0100, Ricardo Galli wrote:

 > It's very cosmetic but very annoying for P3 > 1GHz, where Linux <= 2.4.20-preX 
 > only reports 32 KB of cache and it also seems to ignore the "cachesize" 
 > parameter. Perhaps it really uses 256KB, but not sure.

There was a bug related to that parameter, I'm sure if the fix
went into the same patch, or a separate one. I'll check later.

 > I tested it in a Compaq Proliant 330ML-G2 (P3 1.4) and a kernel compilation is 
 > 100% faster if the patch is applied.

<raises eyebrows>. The SMP weighting used by various parts of the kernel
will be slightly off, but I'd be amazed if it made *that much*
difference.

 > PS: Dave, see you in Mallorca in 20 days :-)

Indeed 8-)

		Dave

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE:  PATCH: Recognize Tualatin cache size in 2.4.x
@ 2002-11-20  1:41 Mathias Kretschmer
  2002-11-20 13:15 ` Dave Jones
  0 siblings, 1 reply; 11+ messages in thread
From: Mathias Kretschmer @ 2002-11-20  1:41 UTC (permalink / raw)
  To: linux-kernel

 > > I tested it in a Compaq Proliant 330ML-G2 (P3 1.4) and a kernel
 > compilation is 100% faster if the patch is applied.

 > <raises eyebrows>. The SMP weighting used by various parts of the
 > kernel will be slightly off, but I'd be amazed if it made *that much*
 > difference.

I just patched my 2.4.20rc2 kernel. Now, it reports
512K cache for my 2 Tualatin 1.26 GHz CPUs.

'time make -j4 bzImage' went down from 3:30 to 3:04.
Not too bad.

Cheers,

Mathias


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: PATCH: Recognize Tualatin cache size in 2.4.x
  2002-11-20  1:41 Mathias Kretschmer
@ 2002-11-20 13:15 ` Dave Jones
  2002-11-20 14:24   ` Mathias Kretschmer
  0 siblings, 1 reply; 11+ messages in thread
From: Dave Jones @ 2002-11-20 13:15 UTC (permalink / raw)
  To: Mathias Kretschmer; +Cc: linux-kernel

On Tue, Nov 19, 2002 at 08:41:26PM -0500, Mathias Kretschmer wrote:
 > I just patched my 2.4.20rc2 kernel. Now, it reports
 > 512K cache for my 2 Tualatin 1.26 GHz CPUs.
 > 
 > 'time make -j4 bzImage' went down from 3:30 to 3:04.
 > Not too bad.

That is quite an impressive gain.  The patch I sent Marcelo which
also fixes up a problem with some tualatins and adds P4 trace cache
support is at..

ftp.kernel.org/pub/linux/kernel/people/davej/patches/2.4/2.4.20/descriptors.diff

As you have tualatins can you try with the above patch and make sure
theres no regressions there ?

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: PATCH: Recognize Tualatin cache size in 2.4.x
  2002-11-20 13:15 ` Dave Jones
@ 2002-11-20 14:24   ` Mathias Kretschmer
  0 siblings, 0 replies; 11+ messages in thread
From: Mathias Kretschmer @ 2002-11-20 14:24 UTC (permalink / raw)
  To: Dave Jones; +Cc: linux-kernel

Dave Jones wrote:
> On Tue, Nov 19, 2002 at 08:41:26PM -0500, Mathias Kretschmer wrote:
>  > I just patched my 2.4.20rc2 kernel. Now, it reports
>  > 512K cache for my 2 Tualatin 1.26 GHz CPUs.
>  > 
>  > 'time make -j4 bzImage' went down from 3:30 to 3:04.
>  > Not too bad.
> 
> That is quite an impressive gain.  The patch I sent Marcelo which
> also fixes up a problem with some tualatins and adds P4 trace cache
> support is at..
> 
> ftp.kernel.org/pub/linux/kernel/people/davej/patches/2.4/2.4.20/descriptors.diff
> 
> As you have tualatins can you try with the above patch and make sure
> theres no regressions there ?

Hi Dave,

Here are the results. I've upgraded to gcc-3.2.1 yesterday evening.
Hence, we can not compare to the results from yesterday.
The ones below are new:

2.4.20rc2+small-patch (ran it three times with very similar results):
265.05user 16.66system 2:43.09elapsed 172%CPU (0avgtext+0avgdata 
0maxresident)k
0inputs+0outputs (621129major+1391627minor)pagefaults 0swaps

2.4.20rc2-descriptors.diff (also run three times):
302.60user 16.95system 2:43.39elapsed 195%CPU (0avgtext+0avgdata 
0maxresident)k
0inputs+0outputs (621129major+1390848minor)pagefaults 0swaps

Pretty much the same result - within the tolerance.
%CPU is up quite a bit.

Also, my optimization options are '-Os -march=pentium3'.

The machine was idle but still in multi-user mode. If
you need more precise results, I could do that over the weekend.

Cheers,

Mathias

---

 > cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 11
model name      : Intel(R) Pentium(R) III CPU family      1266MHz
stepping        : 1
cpu MHz         : 1280.932
cache size      : 512 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 pae mce cx8 apic sep mtrr pge 
mca cmov pat pse36 mmx fxsr sse
bogomips        : 2555.90

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 11
model name      : Intel(R) Pentium(R) III CPU family      1266MHz
stepping        : 1
cpu MHz         : 1280.932
cache size      : 512 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 pae mce cx8 apic sep mtrr pge 
mca cmov pat pse36 mmx fxsr sse
bogomips        : 2555.90


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: PATCH: Recognize Tualatin cache size in 2.4.x
  2002-11-19 12:08     ` Dave Jones
@ 2002-11-20 20:03       ` Stephan von Krawczynski
  2002-11-20 20:22         ` erich
  2002-11-20 21:41         ` Dave Jones
  0 siblings, 2 replies; 11+ messages in thread
From: Stephan von Krawczynski @ 2002-11-20 20:03 UTC (permalink / raw)
  To: Dave Jones; +Cc: gallir, linux-kernel, marcelo

On Tue, 19 Nov 2002 12:08:34 +0000
Dave Jones <davej@codemonkey.org.uk> wrote:

> On Mon, Nov 18, 2002 at 09:54:52PM +0100, Ricardo Galli wrote:
> 
>  > It's very cosmetic but very annoying for P3 > 1GHz, where Linux <= 2.4.20-preX 
>  > only reports 32 KB of cache and it also seems to ignore the "cachesize" 
>  > parameter. Perhaps it really uses 256KB, but not sure.
> 
> There was a bug related to that parameter, I'm sure if the fix
> went into the same patch, or a separate one. I'll check later.

Sorry for this possibly dumb comment/question:
my Tualatins have 512KB cache on die. Are we all sure that it's used?
/proc says indeed 32KB on 2.4.20-rc2

Regards,
Stephan

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: PATCH: Recognize Tualatin cache size in 2.4.x
  2002-11-20 20:03       ` Stephan von Krawczynski
@ 2002-11-20 20:22         ` erich
  2002-11-20 21:41         ` Dave Jones
  1 sibling, 0 replies; 11+ messages in thread
From: erich @ 2002-11-20 20:22 UTC (permalink / raw)
  To: Stephan von Krawczynski; +Cc: linux-kernel


Stephan von Krawczynski <skraw@ithnet.com> wrote:

> On Tue, 19 Nov 2002 12:08:34 +0000
> Dave Jones <davej@codemonkey.org.uk> wrote:
> 
> > On Mon, Nov 18, 2002 at 09:54:52PM +0100, Ricardo Galli wrote:
> > 
> >  > It's very cosmetic but very annoying for P3 > 1GHz, where Linux <= 2.4.20-
> preX 
> >  > only reports 32 KB of cache and it also seems to ignore the "cachesize" 
> >  > parameter. Perhaps it really uses 256KB, but not sure.
> > 
> > There was a bug related to that parameter, I'm sure if the fix
> > went into the same patch, or a separate one. I'll check later.
> 
> Sorry for this possibly dumb comment/question:
> my Tualatins have 512KB cache on die. Are we all sure that it's used?
> /proc says indeed 32KB on 2.4.20-rc2

On x86 systems in general the full cache sizes are always used.  It's
enabled in the hardware/BIOS, so there should be no problem there.

The only thing it might do is change any optimizations the Linux kernel
is trying to make to optimize for the cache size.  The only one I'm
aware of at the moment is the weighting algorithm when running in SMP
(i.e. how hard to fix a process to a particular processor in order to
take best advantage of the cache footprint).

--
    Erich Stefan Boleyn     <erich@uruk.org>     http://www.uruk.org/
"Reality is truly stranger than fiction; Probably why fiction is so popular"

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: PATCH: Recognize Tualatin cache size in 2.4.x
  2002-11-20 20:03       ` Stephan von Krawczynski
  2002-11-20 20:22         ` erich
@ 2002-11-20 21:41         ` Dave Jones
  2002-11-20 21:53           ` Stephan von Krawczynski
  1 sibling, 1 reply; 11+ messages in thread
From: Dave Jones @ 2002-11-20 21:41 UTC (permalink / raw)
  To: Stephan von Krawczynski; +Cc: gallir, linux-kernel, marcelo

On Wed, Nov 20, 2002 at 09:03:57PM +0100, Stephan von Krawczynski wrote:
 > On Tue, 19 Nov 2002 12:08:34 +0000
 > Dave Jones <davej@codemonkey.org.uk> wrote:
 > 
 > > On Mon, Nov 18, 2002 at 09:54:52PM +0100, Ricardo Galli wrote:
 > > 
 > >  > It's very cosmetic but very annoying for P3 > 1GHz, where Linux <= 2.4.20-preX 
 > >  > only reports 32 KB of cache and it also seems to ignore the "cachesize" 
 > >  > parameter. Perhaps it really uses 256KB, but not sure.
 > > 
 > > There was a bug related to that parameter, I'm sure if the fix
 > > went into the same patch, or a separate one. I'll check later.
 > 
 > Sorry for this possibly dumb comment/question:
 > my Tualatins have 512KB cache on die. Are we all sure that it's used?
 > /proc says indeed 32KB on 2.4.20-rc2

Odd. If you can send me the output of dmesg, /proc/cpuinfo
and x86info -a, I'll take a look.
(You can find x86info at
 http://www.codemonkey.org.uk/x86info/x86info-1.11.tar.gz)

		Dave

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: PATCH: Recognize Tualatin cache size in 2.4.x
  2002-11-20 21:41         ` Dave Jones
@ 2002-11-20 21:53           ` Stephan von Krawczynski
  0 siblings, 0 replies; 11+ messages in thread
From: Stephan von Krawczynski @ 2002-11-20 21:53 UTC (permalink / raw)
  To: Dave Jones; +Cc: gallir, linux-kernel, marcelo

On Wed, 20 Nov 2002 21:41:04 +0000
Dave Jones <davej@codemonkey.org.uk> wrote:

> On Wed, Nov 20, 2002 at 09:03:57PM +0100, Stephan von Krawczynski wrote:
>  > On Tue, 19 Nov 2002 12:08:34 +0000
>  > Dave Jones <davej@codemonkey.org.uk> wrote:
>  > 
>  > > On Mon, Nov 18, 2002 at 09:54:52PM +0100, Ricardo Galli wrote:
>  > > 
>  > >  > It's very cosmetic but very annoying for P3 > 1GHz, where Linux <= 2.4.20-preX 
>  > >  > only reports 32 KB of cache and it also seems to ignore the "cachesize" 
>  > >  > parameter. Perhaps it really uses 256KB, but not sure.
>  > > 
>  > > There was a bug related to that parameter, I'm sure if the fix
>  > > went into the same patch, or a separate one. I'll check later.
>  > 
>  > Sorry for this possibly dumb comment/question:
>  > my Tualatins have 512KB cache on die. Are we all sure that it's used?
>  > /proc says indeed 32KB on 2.4.20-rc2
> 
> Odd. If you can send me the output of dmesg, /proc/cpuinfo
> and x86info -a, I'll take a look.
> (You can find x86info at
>  http://www.codemonkey.org.uk/x86info/x86info-1.11.tar.gz)

Hi Dave,

I just tested your descriptors.diff, and here are the results:
(make dep clean bzImage modules modules_install, all same tree of course)

2.4.20-rc2:
real  5m27.670s   user  5m6.450s   sys  0m18.710s
real  5m27.590s   user  5m6.760s   sys  0m18.660s
real  5m27.953s   user  5m6.900s   sys  0m18.310s

2.4.20-rc2 with descriptors.diff:

real  5m29.005s   user  5m8.540s   sys  0m18.610s
real  5m27.752s   user  5m8.760s   sys  0m17.870s
real  5m29.021s   user  5m8.210s   sys  0m18.540s

Doesn't really look more than cosmetic, does it?
/proc output is correct with your diff.

Regards,
Stephan


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2002-11-20 21:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-17 15:55 PATCH: Recognize Tualatin cache size in 2.4.x Ricardo Galli
2002-11-18 19:02 ` Dave Jones
2002-11-18 20:54   ` Ricardo Galli
2002-11-19 12:08     ` Dave Jones
2002-11-20 20:03       ` Stephan von Krawczynski
2002-11-20 20:22         ` erich
2002-11-20 21:41         ` Dave Jones
2002-11-20 21:53           ` Stephan von Krawczynski
  -- strict thread matches above, loose matches on Subject: below --
2002-11-20  1:41 Mathias Kretschmer
2002-11-20 13:15 ` Dave Jones
2002-11-20 14:24   ` Mathias Kretschmer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox