* Pentium IV cache line size
@ 2002-07-14 8:27 BALBIR SINGH
2002-07-14 20:58 ` Mark Hahn
0 siblings, 1 reply; 3+ messages in thread
From: BALBIR SINGH @ 2002-07-14 8:27 UTC (permalink / raw)
To: lkml
[-- Attachment #1: Type: text/plain, Size: 754 bytes --]
Hello, All,
Dave Jones sent out a patch about Pentium IV cacheline sizes,
please refer to
http://marc.theaimsgroup.com/?l=linux-kernel&m=100297450316163&w=2
to which Manfred Spraul responded
http://marc.theaimsgroup.com/?l=linux-kernel&m=100299763026680&w=2
I think the patch is correct and should be applied.
>From Pentium IV, System Programming Guide, Section 9.1, Page 9-2,
Table 9-1. Order # 245472
L1 Data Cache - Pentium 4 and Intel Xeon processors: 8 KBytes, 4-way set
associative, 64-byte
cache line size.
L2 Unified Cache - Pentium 4 and Intel Xeon processors: 256 KBytes 8-way
set associative,
sectored, 64-byte cache line size.
The point is that according to the specs both L1 and L2 cacheline sizes
are 64-byte.
Comments,
Balbir
[-- Attachment #2: Wipro_Disclaimer.txt --]
[-- Type: text/plain, Size: 490 bytes --]
**************************Disclaimer************************************
Information contained in this E-MAIL being proprietary to Wipro Limited is
'privileged' and 'confidential' and intended for use only by the individual
or entity to which it is addressed. You are notified that any use, copying
or dissemination of the information contained in the E-MAIL in any manner
whatsoever is strictly prohibited.
***************************************************************************
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Pentium IV cache line size
2002-07-14 8:27 Pentium IV cache line size BALBIR SINGH
@ 2002-07-14 20:58 ` Mark Hahn
0 siblings, 0 replies; 3+ messages in thread
From: Mark Hahn @ 2002-07-14 20:58 UTC (permalink / raw)
To: BALBIR SINGH; +Cc: lkml
> I think the patch is correct and should be applied.
P4 SMP alignment should be 128B, and that seems to be the main
use of this constant. I'd *love* to see the spurious "L1" removed -
in fact, there's already SMP_CACHE_BYTES, which should be used instead.
maybe just CACHE_SHIFT/BYTES, since alignment is used for uni, too.
perhaps a janitor/trivial patch for 2.5?
> >From Pentium IV, System Programming Guide, Section 9.1, Page 9-2,
> Table 9-1. Order # 245472
dueling references! mine are from the p4 and xeon opt guide. page 7-9:
Key Practices of Thread Synchronization:
...
- Place each synchronization variable alone,
separated by 128 byte or in a separate cache line.
see also table 1.1. I'm not sure it matters whether you consider lines 128B
or 64B; the fact that cacheline reads always happen at 128B is probably
the dominant concern. table 1.1 page 7-18 ("placement of shared
synchonization variable") repeats this.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Pentium IV cache line size
@ 2002-07-17 0:53 Mikael Pettersson
0 siblings, 0 replies; 3+ messages in thread
From: Mikael Pettersson @ 2002-07-17 0:53 UTC (permalink / raw)
To: balbir.singh, hahn; +Cc: linux-kernel
On Sun, 14 Jul 2002 16:58:11 -0400 (EDT), Mark Hahn wrote:
> - Place each synchronization variable alone,
> separated by 128 byte or in a separate cache line.
>
>see also table 1.1. I'm not sure it matters whether you consider lines 128B
>or 64B; the fact that cacheline reads always happen at 128B is probably
>the dominant concern. table 1.1 page 7-18 ("placement of shared
>synchonization variable") repeats this.
For SW synchronisation variables this makes sense.
However, I've been in contact with some people doing high-speed routing
with Linux boxes, and they had major performance problems on a dual P4/Xeon.
Somehow, the 128 byte alignment affected how the gigabit NIC driver they
used programmed the NIC, with the effect that buffering of PCI writes
(or something like that, this is from memory) didn't work and performance
dropped like a rock. They manually set the alignment back to 64 bytes in
the NIC driver and performance increased to expected levels.
/Mikael
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-07-17 0:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-14 8:27 Pentium IV cache line size BALBIR SINGH
2002-07-14 20:58 ` Mark Hahn
2002-07-17 0:53 Mikael Pettersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®