Skip to content

events: add performance MSRs to boot event - #11412

Open
ripatel-fd wants to merge 1 commit into
mainfrom
ripatel/boot-msr
Open

events: add performance MSRs to boot event#11412
ripatel-fd wants to merge 1 commit into
mainfrom
ripatel/boot-msr

Conversation

@ripatel-fd

Copy link
Copy Markdown
Contributor

Collect x86 model-specific registers on startup and report them
back to telemetry. It turns out some hardware mitigations like
BpSpecReduce get enabled even if mitigations are off and cause a
big performance impact (e.g. through SEV-SNP).

Collect x86 model-specific registers on startup and report them
back to telemetry.  It turns out some hardware mitigations like
BpSpecReduce get enabled even if mitigations are off and cause a
big performance impact (e.g. through SEV-SNP).
Copilot AI balanced review requested due to automatic review settings September 11, 2026 09:19
@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown
 ┌─ ⚡ PERF · 018b4cb vs main@2fc40e5 ─────────────────────────────────
 │ SUITE                               BASELINE          NEW         Δ
 │ replay tps, mainnet               28,305 tps   28,232 tps  ·  -0.26%
 │ bench tps, localnet              128,647 tps  128,646 tps  ·   0.00%
 │ snapshot load, testnet               15.66 s      15.77 s  ·  +0.72%
 │ mem total, mainnet                171.44 GiB   171.44 GiB  ·   0.00%
 │ mem total, testnet                102.31 GiB   102.31 GiB  ·   0.00%
 │ clean compile, firedancer        315.9 cpu·s  320.4 cpu·s  ·  +1.44%
 │ binary size, firedancer             85.94 MB     85.95 MB  ·  +0.01%
 ├─────────────────────────────────────────────────────────────────────
@@ 0 REGRESSIONS · 0 WARNINGS · 0 IMPROVED · 7 NOISE @@
 └─────────────────────────────────────────────────────────────────────

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Moderate findings remain unresolved around EINTR handling, optional-field test support, and nested nullable-type validation.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds CPU0 x86 MSR collection to boot telemetry for diagnosing hardware mitigation performance effects.

Changes:

  • Adds seven optional MSR fields to event schemas.
  • Collects and publishes available MSR values with presence tracking.
  • Extends nullable integer schema generation.
File summaries
File Reviewed changes and final findings
src/disco/events/schema/events.proto Adds optional MSR fields. Moderate (2 votes): update the test parser for optional and add presence/value assertions.
src/disco/events/schema/boot.json Defines nullable MSR telemetry columns.
src/disco/events/gen_events.py Adds nullable integer generation. Moderate (2 votes): reject or recursively validate nullable types nested in tuples or arrays.
src/disco/events/fd_boot_report.h Stores MSR values and presence flags.
src/disco/events/fd_boot_report.c Reads and publishes MSRs. Moderate (2 votes): retry pread on EINTR. Moderate (1 vote): update the boot-report decoder and test successful MSR publication.
Review details

Suppressed comments (1)

src/disco/events/fd_boot_report.c:326

  • The existing test_boot_report decoder only strips repeated, so it does not recognize these new optional declarations. On a host where /dev/cpu/0/msr is readable, at least msr_x86_spec_ctrl is emitted, the declaration is skipped by proto_msg_fields, and check_msg fails on the unknown field; update the test parser and cover the presence/value path.
  r->msr_x86_spec_ctrl_present = !read_msr( 0U, 0x00000048UL, &r->msr_x86_spec_ctrl );
  if( r->cpu_vendor==2 ) { /* AMD specific */
  • Files reviewed: 5/5 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/disco/events/fd_boot_report.c
@@ -275,6 +286,8 @@ def field_is_supported(f: Field) -> bool:
_NON_LEAF = (ClickHouseType.String, ClickHouseType.Bytes,
ClickHouseType.Flatten, ClickHouseType.Tuple, ClickHouseType.Array)
_SUB_UNSUPPORTED = _NON_LEAF + (ClickHouseType.LowCardinalityString,)
// A numeric identifier summarizing the exact set of protocol features this build understands, used to detect when nodes disagree on consensus rules.
uint32 feature_set_id = 75;
// Raw value of AMD MSR C001_0010 (AMD64_SYSCFG) read from CPU0, or NULL when unavailable.
optional uint64 msr_x86_amd_syscfg = 76;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants