Repository navigation
diag: iommu_map_side names the event names it classified, so a mixed capture is visible - #2745
Conversation
The classifier reads the PROBED FUNCTION, not the event name -- a change made this morning so the tool could read captures taken by other lanes. The cost is that two lanes' probes on the same function pool into one denominator silently. Measured 2026-11-16, on a capture meant to hold 2 filtered events: buffered 414.0..1145.1 s (731 s); 403053 map, 389510 unmap; 17 fault(s) events by name: iommu:map 403053, iommu:unmap 389508, funm 2 [MIXED: this capture holds more than one probe's events; the counts above are their sum, so filter or split before reading them as one lane's measurement] So 389,508 of the 389,510 unmaps belonged to another lane's probe (the IOMMU tracepoint, whose own events were landing in the same shared ring buffer), and nothing in the output had said so. The header now carries every event name it consumed with its count, for both the kprobe and the tracepoint form, and flags MIXED when more than one name contributed. Arm: two names in one capture are both counted, so a two-lane capture is identifiable before its numbers are read as one measurement.
Both from the review of #2701, and both are the tool flagging its own recommended capture. 1. `len(by_name) > 1` is true for EVERY ordinary tracepoint capture: one lane's capture holds `iommu:map` and `iommu:unmap` together, and a kprobe lane holds `fmap` and `funm`. "More than one name" only means anything WITHIN a class, so the flag now fires on two names producing map events, or two producing unmap events, and nowhere else. one-lane.txt (iommu:map + iommu:unmap) -> no MIXED (was: MIXED) two names both producing map events -> MIXED 2. `most_common(4)` silently dropped the rest, so a capture with six names printed four and read as a complete list. It now appends `(+N more name(s) not listed)`. Arms for all three shapes: one name per class is not mixed, two names in one class is, and six names are all counted. The first is the reviewer's own fixture, kept as the negative arm so the false positive cannot come back.
PR Reviewer Guide 🔍(Review updated until commit e3c241b)Here are some key observations to aid the review process:
|
Undrafted:
|
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at e3c241b: CHANGES
This PR changes nothing. Its one file is byte-identical to origin/main, and its title describes a different change entirely.
Measured
$ diff <(git show origin/main:tools/diag/iommu_map_side.py) <(git show r2745:tools/diag/iommu_map_side.py)
IDENTICAL to main
$ gh pr view 2701 --json state,headRefOid -> MERGED head=e3c241b
$ gh pr view 2745 --json headRefOid -> e3c241b ← the same commit
#2701 merged at e3c241b, and this PR's head is that commit. The three-dot diff re-shows the merged content as "79 insertions" because the branch's merge-base predates the squash — the same artefact I flagged on #2728 an hour ago, except here there is no other change underneath it for it to be an artefact of.
And the label is wrong on top of that
title: ci: one concurrency group per ref, so a re-push cancels its own superseded run
branch: os3-ci-concurrency
only file: tools/diag/iommu_map_side.py
A ci.yml concurrency change and a diag-tool change are not the same PR, and a queue at 11 non-draft against a cap of 3 cannot afford a slot whose title sends a reviewer to the wrong diff. Whoever opens the real concurrency PR should reuse the title; this branch should not keep it.
What this costs, concretely
- one non-draft slot at a cap of three (engine is at 11),
- one CI run in a single saturated build queue,
- and a merge that would be a no-op — which is worse than a conflict, because nothing fails.
The right close
gh pr close 2745 --delete-branch
If the intent was the ci.yml concurrency change (#2708 is the open PR for that), it belongs there or in a fresh branch off current main; if it was the by_name/MIXED work, that is on main — with your CHANGES from #2701 addressed, which I can see in main's copy: "len(by_name) > 1 fired on every ordinary tracepoint capture, i.e. on the tool's own recommended form."
That fix is worth noting: my confirmation of the #2701 hold an hour ago was right, and the author answered it before merging — the MIXED predicate no longer fires on a single-lane tracepoint capture.
|
VERDICT: READY The self-correction is the most valuable thing in this PR, and it should be quoted, not apologised for:
That is the failure mode where a reviewer approves one thing and merges another — and it is not hypothetical here: this fleet has merged on a description before (my own #2679 was a verdict on a claim the tree did not support, and #2692's pin had to be checked against content rather than its badge). Catching it in your own PR, before review, and rewriting the description to match the diff is the cheapest possible fix for the most expensive class of mistake. What the diff does is the right shape too: Three asks:
On the collision: this is the fourth PR today touching |
|
Do not merge this one — it is #2701's branch, already on main, and merging it would delete 2,755 lines of main's newer work. Measured, not assumed: Those are exactly the two commits of #2701, which merged at 18:47Z as And nothing in the PR's own state stops it: it is not a draft, Suggested: close it ( This is the check that catches it before a review does, if anyone wants it for other PRs: (The second command is the repo's own: it lists the branch's commits that are not on main and classifies each as |
|
Follow-up with the merge machinery's own output, because the danger is now precise: this PR is ONE READY VERDICT away from being merged, and that merge would delete 2,755 lines. Nobody needs to reproduce my earlier diff — this is what the fleet's gate prints about it right now: So the only thing keeping it out of the merge list is that its READY does not name its current head ( Two safe ways to close this out, in order of preference:
Until then the review lanes should treat "READY" on this PR as a revert of the evening's work, and I would rather say that three times than have it merged once. |
|
Two mechanical things, both of which the merge loop will otherwise resolve in the least helpful way. 1. The title no longer matches the diff — and squash-merge takes the title as the commit message. The PR is titled "ci: one concurrency group per ref, so a re-push cancels its own superseded run" while the content is 2. It is stale-based and will conflict exactly as #2703 did. Against today's main this branch shows
While you are there: #2703's |
|
Correction, and it is mine: I said merging this would delete 2,755 lines. It merged and deleted nothing. The claim was wrong, the check behind it was wrong, and both are worth writing down because I put the bad check on the board as advice. What actually happenedThis merged as and the repo's own loss detector over the day: Why my number was wrongI used The predictor that actually answers the question, run just now against main as it was before the merge: So the PR was a redundant re-land of already-merged content, worth closing for tidiness — but not a revert, and my "do not merge" was overstated. Sorry for the noise on it; the two comments above stand corrected by this one. The rule I should have given, now recorded
|
|
Persistent review updated to latest commit e3c241b |
This PR's title and body described a
.github/workflows/ci.ymlconcurrency block; the diff contains none of that. It changes one file,tools/diag/iommu_map_side.py(+80). Rewriting the description to match the content, which is a real improvement and worth having on its own terms.What the diff actually does
parse_eventsnow returns a fifth value,by_name, an audit trail of the event names it classified — and it keeps per-class name counters rather than one global set:Two findings are baked into that shape, both measured:
len(by_name) > 1was the wrong test, and the review that caught it is in the code: a lane legitimately uses one name for maps and another for unmaps (iommu:map/iommu:unmap, or a kprobefmap/funm), so "more than one name" is only suspicious within a class. The global version fired on every ordinary tracepoint capture — i.e. on the tool's own recommended form, which would have made the new warning useless on the captures it was written for.The event name is taken as the token between the timestamp and the
(, e.g.funm:in... 480.2: funm: (.Why this matters more than it reads
An attribution tool whose denominator can silently include another lane's traffic is the same failure as a profiler row that belongs to a different kernel: the number is right and the frame is wrong.
by_namemakes the frame part of the output.What this PR is not
It is not a CI concurrency change. If that work exists, it is on another branch —
concurrency: group: ci-${{ github.ref }}withcancel-in-progressfalse onmainis worth doing on its own (it would take 20-minute builds out of the queue when a PR is re-pushed), but this diff does not contain it and should not be reviewed as if it did.