NewsCrawler.org

Reversing the Next-Page Prefetcher in Skylake-X

The article is a blog post by its author about reverse-engineering the next-page prefetcher in Intel's Skylake-X[1] processors. Intel's optimization manuals say that the next-page prefetcher (NPP)[2] was added in Ivy Bridge and is triggered by sequential accesses near a page boundary, either upward or downward. A newer Redwood Cove design has an LLC Page Prefetcher that works two pages ahead and tries to bring an entire 4Kb page into the last level cache. Redwood Cove shipped in Meteor Lake P-cores starting in late 2023, while Ivy Bridge launched in 2012 and was discontinued by 2015.

The author asks whether Skylake-X has a next-page prefetcher, what triggers it, how many future page table entries it loads, where it loads them, and in which direction it prefetches. A prefetcher preloads data that a program may need soon, so the CPU does not stall waiting for memory. A next-page prefetcher loads page table entries into the Translation Lookaside Buffer (TLB)[3], so it must work across page boundaries by design.

Skylake-X has two TLB levels: each core has separate L1 data and instruction TLBs, and the L2 TLB is unified. The L1 data TLB has 100 entries in total, 64 of them reserved for 4k pages. The experiments run on Linux and use the perf_event_open syscall to count hardware events, and on Linux the restrictions on hardware counter access may need to be relaxed by setting perf_event_paranoid to 0 or -1.

Intel shares (INTC)

51.28 USD −7.1% since the news day, November 17

Close on November 20 Quotes: CNBC Chart by TradingView

Read the original devsh0.github.ioDiscussion

Sources

Published: First seen: Читать по-русски

Open as a page