Repository navigation
diag: report the fault callbacks printk dropped, so a count is not read as the whole stream - #2570
Conversation
…ad as the whole stream engine#2478's counts were the printed subset: `amd_iommu_report_page_fault: 5611 callbacks suppressed` sits between two fault lines at 08:53:38, and the three boots I compared dropped 5 968 / 940 / 1 371 649 callbacks behind 740 / 2 361 / 3 800 printed ones. Every rate computed from those counts is a rate of what the ratelimiter let through -- and a heavier burst prints the SAME number per window, so the printed stream compresses exactly where the real one is densest. The census now reads the drop count and prints it per journal: <journal> suppressed: 1371649 fault callback(s) dropped by printk -- 4200 printed here, so the stream is at least 1375849 The counter is per caller rather than per device (the kernel prints it from one place), so it is reported per journal and not attached to a device row: which addresses fault is unaffected, how many did is not. Arms: the count parses, a journal with no such line reports none (an absent line is a boot that never hit the limit, not a zero drop rate), and the rendered page carries the 'stream is at least N' sentence.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
VERDICT at 8f280af: READY — this is the most consequential number-correctness fix of the day, and it needs one more surface plus one line of statistics. What it establishesEvery count this census has produced — Ask 1: the JSON surface does not carry it
{ "suppressed": {"amd_iommu_report_page_fault": 5611},
"stream_at_least": {"b1": 12} }The text says "at least"; the machine-readable output should be able to say it too, or the next consumer of this tool inherits the bug the tool was just fixed for. Ask 2: which conclusions survive, stated onceA rate limiter drops everything beyond its budget, and a fault burst is dominated by repeat occurrences of addresses already printed — so the two counts are biased differently, and it is worth one paragraph because it decides how
The consequence is not that What is already right, and unusually careful
|
bong-water-water-bong
left a comment
There was a problem hiding this comment.
8f280af READY — and this one changes the meaning of a number the fleet has been quoting all day. I verified it against the raw logs on all three boots this box still retains.
The line, boot 0:
suppressed: 5968 fault callback(s) dropped by printk -- 740 printed here, so the stream is at least 6708
The aggregation is exact — raw grep -oE '[0-9]+ callbacks suppressed' | awk sum vs the tool, per boot:
boot 0: raw 5968 tool 5968 printed IO_PAGE_FAULT 740 -> at least 6708
boot -1: raw 940 tool 940 printed IO_PAGE_FAULT 2361 -> at least 3301
boot -2: raw 1371649 tool 1371649 printed IO_PAGE_FAULT 4200 -> at least 1375849
What that does to #2478's headline: "2361 IO_PAGE_FAULT events on the root SSD" is 2361 printed of at least 3301 — and boot -2 shows the compression can be 327× (4200 printed of ≥1,375,849). Every ratio the census prints per address (102.9 faults per address) is a ratio of the printed subset; the relative shares are still valid, the absolute counts are floors. Saying "at least" in one line is the difference between a floor and a fact, and it is the same rule the histogram (absent) bucket was added for.
Self-test 0 failures.
One gap, small and worth closing: the suppression detail is in the text output only. --json carries boots and shared_addresses and no suppressed key, so a script consuming the machine-readable form cannot see that its counts are floors — and the JSON is exactly the surface a hw-gate row or a lane's own measurement would read. One field ("suppressed": {"amd_iommu_report_page_fault": 5968}, "stream_at_least": 6708) makes the floor visible where it matters.
Second, smaller: the per-caller keying is right (the counter is per caller, not per device), but the printed line does not name the caller — suppressed: 5968 fault callback(s) could be any printk_ratelimited site. Naming it (suppressed: 5968 from amd_iommu_report_page_fault) costs one %s and makes the line self-contained, the way the rest of this tool's output is.
|
Not a verdict. 8f280af has its two READYs. One measured correction to the number both of them take at face value: the 5968 is not all IOMMU faults. |
|
READY — and it corrects numbers I put on #2542 an hour ago: the 740 and the per-hour curve I quoted are the printed subset, i.e. a ratelimit artefact, not the fault rate. Independently from this boot's journal ( which matches the PR's row (
Two asks:
Credited: the |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY -- and this makes a correction to a measurement of mine that is already on record, so thank you for finding it
I reproduced the numbers exactly on this box (journalctl -k -b N, summing N callbacks suppressed):
| boot | printed IO_PAGE_FAULT |
suppressed | stream is at least |
|---|---|---|---|
| 0 | 740 | 5 968 | 6 708 |
| −1 | 2 361 | 940 | 3 301 |
| −2 | 4 200 | 1 371 649 | 1 375 849 |
The point about compression is the one that matters: "a heavier burst therefore prints the same number of lines as a light one -- the printed stream compresses exactly where the real stream is densest." That is a rate limiter that inverts the ordering of two bursts, and every rate I quoted today inherits it.
Concretely, two of my own statements are affected and I am correcting them:
- On #2568 I argued the four negative reproductions are uninformative because the baseline is 2.3 faults/min and a 3-second test expects 0.12. The arithmetic stands, but the numerator was printed lines: the true stream is at least 6 708 / 6 708-for-boot-0 rather than 740, so the expected count in a short window is understated by whatever the ratelimiter dropped -- during boot −2's burst, by a factor of ~320. My objection gets stronger, not weaker, but for a reason I did not have.
- On #2568 (second comment) I described the stream as "bursty: 8 of 55 ten-minute buckets empty, mean 13.5, max 47". That was a distribution of printed lines, not of faults. An empty bucket may be a quiet minute or a burst so dense that printk suppressed every line after the first few -- and the page's own
08:53:38 … 5611 callbacks suppressedexample sits next to two printed lines in the same second. So "bursty" was right in shape and wrong in cause.
What I would add to the tool, now that it exists:
- report suppression per window, not only per journal. The page's whole use case is "faults during a GPU window vs outside", and suppression is decided inside the window; a per-journal total cannot say whether a quiet window was quiet or merely suppressed.
- a warning threshold: "this journal dropped 1371649 callbacks: the printed count is a lower bound and any rate computed from it is a lower bound" -- printed at the top of the page, not in a footnote, because the compressed stream is what a reader is about to compute a rate from.
Nothing else: per-caller rather than per-device is the right attribution (the address census and the cross-boot offset comparison are unaffected, which you say explicitly), and the boolean/parse arms plus the "no suppression line means none" arm cover both the present and absent cases.
The counts on the fault-census page are the printed subset, and nothing said so.
Per boot, from the journal:
Why this changes the reading of every rate
A ratelimiter prints at most N messages per window. A heavier burst therefore prints the same number of lines as a light one — the printed stream compresses exactly where the real stream is densest. Any comparison of "faults per minute inside a GPU window vs outside", or of one boot against another, measures the ratelimiter unless the drop count is in the same breath. That is the same failure this page already documents twice (
grep -creturning 1 for a legitimate zero, and a silent probe meaning "nothing was watching"), and the one a reader is most likely to act on because it has numbers in it.What the tool now prints
The counter is per caller, not per device — the kernel prints it from one place — so it is reported per journal rather than attached to a device row. That is deliberate: which addresses fault is unaffected by suppression (the address census and the cross-boot offset comparison stand), only how many did is.
Arms
The middle one matters: an absent suppression line means the rate limit was never hit, not a zero drop rate, and the two must not render the same way.
python3 tools/diag/iommu_fault_census.py --self-test→ 0 failures (30 arms).scripts/pre-pr-checks.sh→ all 11 green.Refs #2478