Repository navigation
Conversation
#10716 copied cached file pages in 4 MiB chunks, alternating filling one chunk's page tables with copying the previous one, and kept that size independent of #10715, which grew staged file reads to 8 MiB chunks. Both used `FILE_READ_CHUNK_BYTES`, so #10715 silently doubled the mapped copy chunks as well, delaying the first copy of every mapped read. Give mapped copies their own 4 MiB chunk size. Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
|
@claude review this pr in depth |
|
Claude finished @0ax1's task in 1m 0s —— View job Review: restore 4 MiB chunks for mapped file copies
Verdict: The fix is correct and small. I found no correctness problems. There's one test-coupling nit and a couple of optional suggestions. Correctness
Nits / suggestions
TestsThe mapped test cases now use PerformanceThe tradeoff in the PR body is reasonable: twice as many launches and lock acquisitions in exchange for an earlier first copy and shorter lock holds, which also helps fairness when several mapped readers compete for ChecksI only reviewed the code. I didn't compile or run anything, per the repo's verification guidance. |
Merging this PR will improve performance by 10.89%1 warning
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes
|
Summary
#10716 copied cached file pages in 4 MiB chunks, alternating filling one
chunk's page tables with copying the previous one, and kept that size
independent of #10715, which grew staged file reads to 8 MiB chunks.
Both used
FILE_READ_CHUNK_BYTES, so #10715 silently doubled themapped copy chunks as well, delaying the first copy of every mapped
read.
Give mapped copies their own 4 MiB chunk size.
Changes
Performance
Intended improvement in latency to the first mapped copy, restoring the size #10716 tuned. The tradeoff is twice as many copy launches and page-table fill lock acquisitions per mapped read than with 8 MiB chunks.
Checks
Not compiled or tested locally. CI runs the checks.