Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is PDE cache?

I have the following specifications of an ARM based SoC:

  • L1 Data cache = 32 KB, 64 B/line, 2-WAY, LRU
  • L2 Cache = 1 MB, 64 B/line, 16-WAY
  • L1 Data TLB (for loads): 32 entries, fully associative
  • L2 Data TLB: 512 entries, 4-WAY
  • PDE Cache: 16 entries (one entry per 1 MB of virtual space)

And I wonder what is the PDE cache? I guess it's something similar to TLB, but I'm not sure.

Answer
It seems that PDE (Page Directory Entry) is Intermediate table walk cache which indeed can be implemented separately from TLB.

The Cortex-A15 MPCore processor implements dedicated caches that store intermediate levels of translation table entries as part of a table walk.

like image 987
Nikolai Avatar asked Nov 15 '14 11:11

Nikolai


2 Answers

A PDE ("Page Directory Entry") is x86 architecture terminology for a top level* page table entry - the equivalent of a "first-level descriptor" in ARM VMSA terms.

Assuming this is the source of the data in the question, it's presumably referring to Cortex-A15's "intermediate table walk cache", which is not entirely appropriate since that can actually cache any level of translation.

* in IA-32 at least - 64-bit mode has levels above this

like image 170
Notlikethat Avatar answered Oct 26 '22 17:10

Notlikethat


A TLB caches full translations, it doesn't reflect a coherent part of the memory per-se (although not being coherent, it may cause loss of coherency in case the page map changes, so SW must enforce coherency explicitly through flushing).

However, the pagemap itself does reside in memory, and as such - every part of it may also be cached, whether in the general purpose cache hierarchy, or within special dedicated caches such as a PDE cache. This is implementation specific, different CPUs may decide differently how to do that.

An access hitting the TLB (in any of its levels) won't need that data, but a TLB miss will trigger a pagewalk which will issue memory reads from the pagemap - these reads may hit in the caches if they include the pagemap data, instead of having to go all the way to memory.

Since a pagewalk is a long, serialized, critical chain of accesses (even more so if you have virtualization), you can imagine how important it is to optimize the latency of these accesses by caching them. Therefore, a dedicated cache to any of the pagemap levels, which would help them compete with the normal data lines (that are much more frequently thrashing the cache), is often very useful for performance

like image 24
Leeor Avatar answered Oct 26 '22 19:10

Leeor