← Back to Pull requests

LATX, opt: Shrink low-memory TB jump cache #542

Open
baibaidashixiong opened this pull request with 4 lines diff across 1 files
View on GitHub
baibaidashixiong baibaidashixiong commented on Nov 04, 2026 02:10 UTC
Author

Summary / 变更说明

Use a smaller per-thread TB jump cache only when the build selects CONFIG_LATX_LOW_MEM_0. Normal builds keep the existing cache size and behavior.

Branch: pr/upstream-lowmem-tb-jump-cache

Commit: 52c131e LATX, opt: Shrink low-memory TB jump cache

Validation / 验证

Performance / 性能数据

| Workload | 16-bit jump cache | 14-bit low-memory cache | Result |
|---|---:|---:|---:|
| Interleaved CoreMark median | 13,593.42 iterations/s | 13,578.20 iterations/s | -0.11%, within scheduling variance |
| Three-window Wine video, forward pair | 5,461.0 MiB PSS / 291.42% CPU | 4,128.8 MiB PSS / 292.31% CPU | -1,332.2 MiB (-24.4%) PSS |
| Three-window Wine video, reverse pair | 5,658.3 MiB PSS / 315.62% CPU | 4,130.4 MiB PSS / 280.65% CPU | -1,528.0 MiB (-27.0%) PSS |
| Worker stability | Reverse run briefly expanded to 15-17 workers | Both 14-bit runs stayed at 14 workers | Improved stability |

Each memory unit in CPUState loses 384 KiB when moving from 16 to 14 bits, which is amplified by the large number of guest worker threads. All CoreMark CRCs matched, both 14-bit playback runs made about 33-34 seconds of video progress, and no swap was observed. The unbound absolute CoreMark values had a wider bimodal distribution; the decision therefore uses the interleaved median rather than a single run.

  • ./latxbuild/build64.sh -c -l 0 passed for the isolated branch.

  • Interleaved CoreMark runs kept correct CRCs and no reproducible throughput regression.

  • Same-prefix Wine video tests covered forward and reverse ordering and measured lower process PSS.

  • Full lat-pr-fast: 50/50 passed.

  • Normal non-LOW_MEM builds retain the original TB_JMP_CACHE_BITS value.
  • Checklist / 检查项

  • I have read CONTRIBUTING.md. / 我已阅读 CONTRIBUTING.md。

  • Every commit contains a DCO sign-off (git commit -s). / 每个提交都包含 DCO 签署(git commit -s)。

  • I have included relevant build or test results, or explained why they are not applicable. / 我已提供相关构建或测试结果,或说明了不适用的原因。
  • Diff: 4 lines (+4 / -0) across 1 files Reviewer: LaurenIsACoder Review duration: 44106m
    All Vouch review confidence checks passed
    Residual risk 0.05 = Change Risk (0.13) × (1 − Review Confidence (0.64)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.13 · 4 lines diff across 1 files
    0.13
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.35 · 1 substantive comment(s)
    0.35
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    63%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.096
    Real PR Conversation Timeline
    2 items
    LaurenIsACoder LaurenIsACoder requested changes on Nov 17, 2026 12:13 UTC
    Changes Requested Reviewer

    同pr555,这种会改变影响aot重定位逻辑的优化,可能需要考虑实际使用中部分软件开优化,另一部分关键不开这个优化,但是共用so这种情况,会出错,同意想一下这类优化如何处理更为合适

    Assignees
    baibaidashixiong baibaidashixiong
    Labels
    risk: low confidence: 63.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 12.6% (LOW) · Higher = larger blast radius
    12.6%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 63.7% · Lower = rushed or shallow review
    63.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 4.6% · Safe to merge
    4.6%