Repository navigation
Stream runs of whole-line writes past the caches - #371
Merged
Merged
Conversation
A cache given a write-streaming configuration counts a hart's whole-line writes to consecutive lines, in either direction, and once a run is long enough writes them without fetching the line: kept by the next level from skip_l1_from, by no cache from skip_l2_from, as the Cortex-A72's load/store unit does (CPUACTLR_EL1[28:25]). A streamed line travels as MemOp::WriteFull, or through the coherence fabric as a CHI-style WriteUniqueFull that invalidates every other copy. Off unless configured.
A 4-entry write-combining buffer, write streaming at the TRM's reset thresholds and the L2's 16 outstanding writes. A 32 MB copy now runs at 1,575 MB/s and a fill at 5,383 MB/s, against 2,253 and 2,883 on a Raspberry Pi 4; the remaining gap is the DRAM model (#370).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A cache can now stop allocating for a run of whole-line writes, as the Cortex-A72 does for a copy or a fill, instead of reading every line it is about to overwrite.
Mechanism
write_streaming=WriteStreaming(skip_l1_from=…, skip_l2_from=…), the L1D counts a hart's whole-line writes to consecutive lines, in either direction. A partial-line write ends the run; reads do not, so a copy's loads leave its stores' run intact.skip_l1_fromthe line is written without a fetch and kept by the next level; fromskip_l2_fromno cache keeps it.MemOp::WriteFull { allocate }, which memory controllers post like a writeback. Through the coherence fabric it is a CHI-styleWriteUniqueFullthat invalidates every other copy.MakeUnique); a follow-up issue covers that.streamed_writesandstreamed_installsper cache, andrequests.write_unique_fullat the home. All are covered by accounting checks.WriteStreamingconfig refusesskip_l2_from < skip_l1_from.Cortex-A72 calibration
The remaining gap is memory: the calibration's
Dramcontroller is fitted to the Pi's latency, not its bandwidth (#370). CoreMark/MHz moves from 5.12 to 5.05 (Pi 5.50) and DMIPS/MHz from 3.89 to 3.86.Checked locally
make accuracy(unchanged).make lockstep-ci: 858/858.ref cortex-a72andref linuxwith 4 harts: 376/376.