Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for December 5, 2013
Deadline scheduling: coming soon?
LWN.net Weekly Edition for November 27, 2013
ACPI for ARM?
LWN.net Weekly Edition for November 21, 2013
Will PAT usage yield better performance in general, only for specific applications, or not at
Getting a handle on caching
Posted May 15, 2008 13:50 UTC (Thu) by arjan (subscriber, #36785)
PAT isn't about performance per se.
Until now, the kernel uses MTRR and while that's a tad slow, it's done once during X startup,
and pretty much static afterwards... (and "tad slow" is not human-noticable at all, it's way
The real problem is that the number of MTRR entries is very limited (8 on Intel CPUs for
example); this is in fact so few that BIOSes increasingly will need/use all 8 just to map the
existing system, so there's no new ones available for X in such a case..... PAT is the only
option then to get write-combinable memory.
So *if* you hit the "8 limit", it's a big performance thing, but if you don't hit the limit...
you'll not notice the difference.
Posted May 15, 2008 19:43 UTC (Thu) by ebiederm (subscriber, #35028)
MTRRs can be setup in an overlapping mode where UC MTRRs trump WB MTRRs.
In that case even if there are spare MTRRs the only way we can get WC
memory regions is to through the use of PAT.
BIOS's do that even on Boxes where it isn't strictly necessary to
avoid going over the 8 MTRR limit.
WC (write combining) technically allows read combining as well.
Just none of the current instructions take advantage of that fact.
Where PAT really wins is if you have a several high performance
cards in your system that want to take advantage of WC. Which
they can't do today because of the limitation in PAT resources.
WC when the hardware takes advantage of it can be a real performance win.
In one extreme example I saw a specialized low latency network card generate line rate 8Gpbs
traffic directly from the cpu without touching
memory. So it is very nice when you can get it.
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds