Devashish Jaiswal wanted to know when Skylake-X gets the next memory page’s address translation ready. Reading across 1,000 pages in order left almost no misses in the CPU’s second-level translation cache. The next question was which reads caused the difference.
- Reading only the first half of each page produced 1,001 second-level misses. Reading only the second half produced two.
- Narrower probes found a boundary between two neighboring cache lines. Reading the last byte of one line and the first byte of the next produced just three misses. Skipping either line brought the misses back to 1,000.
- The probes point to one page of lookahead on the tested machine. Backward scans and writes did not show the same effect.
Start with a workload that makes the effect obvious, then remove one suspected ingredient at a time. Jaiswal even checks the compiled assembly so the reads happen in the order the test assumes.