Repository navigation
osbench: a row says where its processes ran - #1126
Merged
Merged
Conversation
A request/reply row that reads high on a machine of two LLCs may only have run its two sides in different caches. On the AMD bench the ipc reqrep and fs.disk rows read about a quarter slower in some boots than in others, and nothing in the row said where either side had run. Each row that measure::each times, and each of ipc's request/reply rows, now ends with ran=name.pid@cpuN/llcL:share%. It lists up to four processes the kernel's diary saw picked during the timed samples, most picked first, each with the CPU it was picked on most, that CPU's LLC and the share of its picks there; ran_lost counts records the rings overwrote. The LLC comes from CPUID's deterministic cache parameters (leaf 04H on Intel, 8000_001DH on AMD), at their highest level. The diary is drained before the samples and read after them, so neither read is timed. Linux, and a boot without the trace capability, add nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 1, 2026
ran::start reads the whole diary, 16 rings of 8,192 records on the AMD bench, into a vector of several MiB, and it ran after the warmup and the clock's settle, immediately before the first timed sample. So it evicted the working set the warmup had just built, and nothing compared a row with and without it. Each row now opens the span before its warmup, which rebuilds what the samples run in; the field covers warmup and samples, which the header says. A drain that failed partway was ignored, so the field could report records from before the span. start now keeps no diary handle when its read fails. The header also notes that ran_lost biases the share against a busy CPU, whose ring overwrites first, and drops the rationale sentence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
Review r2 of #1126 at
|
Japabu
marked this pull request as ready for review
November 1, 2026 12:00
This was referenced Nov 1, 2026
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.
Problem
A request/reply row that reads high on a machine with two LLCs may only have run its two sides in different caches. On the AMD bench,
ipc.reqrep.8and thefs.diskrows read about a quarter slower in some boots than in others. Nothing in a row said where either side had run, so a scheduler A/B could not tell placement from the change.Behaviour
measure::eachtimes, and each of ipc's request/reply rows, now ends withran=name.pid@cpuN/llcL:share%,....ran_lostcounts records the rings overwrote.tracecapability adds nothing.Checks
Evidence:
pr-1126/r2at 3ccd1580; round 1pr-1126/r1.cargo run -- --ci hostfc90d1018(review r1, on main24a538c88), clean treecargo run -- --ci host6adab470bosbench_ipcandosbench_fileson 4 TCG CPUs (a run-time edit ofosbench_capability_groups_exit_0, never committed)6adab470bran=. TCG's CPU describes no cache, so its LLC reads?69512b82b, alone and under the scheduler stackd51d28819and its stack armstopo:lines (cpu0–7 LLC 0, cpu8–15 LLC 1) in every row. The T14 reads LLC 0 throughout, as its single L3 is.The metal boots ran the field read after the warmup, before review r1 moved it; the move changes when the diary is read, not what it holds. They are the scheduler AMD diagnostic:
pr-1111/r2. Itsplacement.txtis what this field was written for. Eachipc.reqrep.8andfs.disk.read_4k_atvalue there follows where its pair ran: 8.4–8.5 µs split across the LLCs against 6.7–6.9 µs within one.Risks
ran_lostsaying how many records went. Each CPU has its own ring, so a busy CPU's share is then counted short against a quiet one's.🤖 Generated with Claude Code