Skip to content

Trace ring's unfiltered window on a dispatching CPU is 15-30 ms, not seconds: CTX_DIAG/DEFER_REQUEUE dominate it #855

Description

@ryanbreen

The reading

The failure-trace-capture PR-3 emitter's [BXCAP:RING] section reports the
live window of the capturing CPU's trace ring. On its first boots, from
--features boot_tests,capture_selftest strict-gate runs at 3000 ms of guest
uptime on an aarch64 cortex-a72 -smp 4 guest:

[BXCAP:RING cpu=2 writes=475557 dropped=474533 kept=1024 span_us=29958 enabled=1]
[BXCAP:RING cpu=3 writes=478191 dropped=477167 kept=1024 span_us=15410 enabled=1]

15 to 30 milliseconds of history, with ~477k events already overwritten by
3 seconds of uptime.

Why this is not a contradiction of #852 / PR-2

PR-2's [RING_SPAN:cpu=0:...] self-check measures CPU 0's ring filtered to
TIMER_TICK events
, and reports ~1500 ms after its sampling fix. That is
the right measurement for the question PR-2 asked -- whether sampling widened
the tick history -- and it is accurate.

The unfiltered window is a different quantity. The CTX_DIAG_* and
DEFER_REQUEUE_* families (0xff39-0xff48) emit roughly a dozen ring
events per dispatch, and on a CPU that is dispatching steadily they dominate
the 1024-entry buffer. TIMER_TICK entries survive across ~1.5 s because they
are sparse; everything around them is 15-30 ms deep.

Why it matters to the rest of the program

PR-4 wires the capture to the terminal edges, and a fault's EV tail is read
from whichever CPU faulted -- not from CPU 0, and not filtered. So the
pre-fault timeline a fault capture carries today is 15-30 ms wide on a busy
CPU, not the seconds the plan's section 2.2 arithmetic assumes.

Options, none taken here:

Evidence

docs/planning/green-program/failure-capture/serials/pr3/aarch64-selftest-complete.txt
and aarch64-selftest-sched-lock-held.txt in this repo carry [BXCAP:RING]
lines from real boots. Round doc: docs/planning/green-program/failure-capture/PR-3-2026-09-05.md
section 6.4.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions