From ea34bccb6381a4ddb4151e0e3c57b872b0bf1044 Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Wed, 16 Sep 2026 22:24:56 -0400 Subject: [PATCH] [Docs] (Disaggregated): close out P5b - record the completed host gate and merged census at 348d22a4, the review addendum's pinned results, and the Redmi exit at 82683d4a (correctness 8/8, first barrier-tax measurement, iris-bsl fixture-limit supplement); next is P6 spawn transport --- docs/Disaggregated/CURRENT_STAGE_PROGRESS.md | 40 ++++++++++++-------- docs/Disaggregated/MEASUREMENTS.md | 29 +++++++++++--- docs/Disaggregated/ROADMAP.md | 6 +-- 3 files changed, 50 insertions(+), 25 deletions(-) diff --git a/docs/Disaggregated/CURRENT_STAGE_PROGRESS.md b/docs/Disaggregated/CURRENT_STAGE_PROGRESS.md index febc8f9a..2b5112ac 100644 --- a/docs/Disaggregated/CURRENT_STAGE_PROGRESS.md +++ b/docs/Disaggregated/CURRENT_STAGE_PROGRESS.md @@ -1,6 +1,6 @@ # 当前阶段进度 -分支 `feat/disaggregated`,头 `7cb29d46`(2026-09-16,已推 GitHub)。本文随每次落地更新。 +分支 `feat/disaggregated`,头 `c77831e0`(2026-09-16,已推 GitHub)。本文随每次落地更新。 逐条裁定的长文原文在 git 历史里(`git log -p -- docs/Disaggregated/CURRENT_STAGE_PROGRESS.md`,`ef35ea0c` 之前的版本 = ID-1..75 全文)。 ## 1. 阶段状态 @@ -9,8 +9,8 @@ |---|---|---| | P0 / P0.5 / P1 / P2 / P3a / P4a | 已落地 | 见 `ROADMAP.md`、`MEASUREMENTS.md` §1–§25 | | **P5** 首个 IPC 帧(reduced path) | **已收官** | `ff2994d9..37fc4fdb`,八包 + j0/x2/ap/docs | -| **P5b** inproc 下的 verb 迁移 | **代码已落地,测量未收口** | `37fc4fdb..7cb29d46` | -| P6 spawn transport | 未开始 | 排在 P5b 之后 | +| **P5b** inproc 下的 verb 迁移 | **已收官(2026-09-16)** | `37fc4fdb..c77831e0`;出口证据见 `MEASUREMENTS.md` §33–§35 | +| P6 spawn transport | 未开始 | 设备出口已完成,可以开始 | ## 2. 当前头实测 @@ -18,12 +18,16 @@ |---|---| | 构建 | pull / push / verify / split 四个 flavour 全部通过 | | G1(pull 符号恒等) | `.text +0`,27814 符号 0 增 / 0 删 / 0 resize / 0 重命名 | -| unit | pull / push / verify 各 1817/1817;split 2138/2138 | +| unit | pull / push / verify 各 1817/1817;split 2138/2138(`348d22a4` 主机门为 2132;含 `7cb29d46` 后 UserIndexSpan 3/3 复证) | | `integration-split`(inproc) | **107/107**(P5 收官时 22) | | `integration-gpu`(push) | 1148/1148 | | `integration-gpu`(split,单体传输) | 1267/1267 | | G5(p3a / p4a 保护区) | 双绿 | -| 集成普查(inproc,测于 `348d22a4`) | 811 passed / 203 skipped / 62 aborted,共 1267 | +| 主机收尾全门(`348d22a4`) | **complete=true, exit 0**:31 步原始 rc=0 + retrace-verify 续跑合并 **79/79**,retrace-push 79/79,OpenRA 2/2;对账 `reconciliation-20260916.md` | +| 集成普查(inproc 车道,`348d22a4`) | 1267 selected = 811 passed / 203 skipped / 62 aborted / 191 failed,对 c0b **零回退** | +| 79 trace 普查(inproc,stage 256 MiB,`348d22a4`) | **72 passed / 6 aborted / 1 failed**(三轮续跑补齐;首阻塞清单见 `MEASUREMENTS.md` §33) | +| Redmi 正确性(`82683d4a`,p5bcodex2,stage 256 MiB) | **8/8**,四条 A/B trace 双后端首次在设备上 inproc 渲染 | +| Redmi 四臂 A/B(同上) | 24/32 组 200 帧尾验证全绿,barrier tax 首次实测(`MEASUREMENTS.md` §35);iris-bsl 8 组为 fixture 123 帧上限,补充表另记 | ## 3. P5b 落地内容 @@ -44,30 +48,29 @@ - `DrawElements` 不再是阻塞。d1 普查时 77 个 Minecraft 后端用例中 28 个渲染通过(SSIM ≥ 0.99995)。 - blit + mip 之后:`improved-transparency-minecraft-26.3` DirectVulkan SSIM 0.999914;`minecraft-1.21.4-fabric-iris-bsl-in-world` DirectVulkan 0.997324、DirectGLES 0.997496。 - OpenRA 双后端 SSIM 1.0。 -- 新头上的完整 trace 普查未跑。 +- **新头完整 trace 普查已跑(2026-09-16,`348d22a4`,stage 256 MiB):79 = 72 passed / 6 aborted / 1 failed**。首阻塞:`rd12` GLES `InitialBytesNotCarried/resource_respecify`、VK `BarrierTimeout/Present`;`iris-photon` / `iris-derivative` / `create-indirect` GLES 均 `UnmigratedEmulation/texture-remint-pull`;`iris-bsl-esc-menu-854` GLES `InitialBytesNotCarried/resource_respecify`;`create-indirect` VK 内存膨胀被守护杀死(llvmpipe 上 >60 GiB RSS,两次复现)。 +- **Redmi 出口达成(2026-09-16)**:四条 A/B trace × 双后端在设备上以 inproc split 渲染,正确性 8/8;四臂 A/B 首次测得 barrier tax(逐线程 CPU p50 split−push:+5.9% – +18.2%,六组;`MEASUREMENTS.md` §35)。 ## 5. 开放项(按优先级) | 项 | 证据 | |---|---| -| `SEG_STAGE` 默认 32 MiB 装不下 128 MiB 上传:improved-transparency DirectGLES 报 `Fatal{RingOverrun}`。`MOBILEGL_IPC_STAGE_MB=256` 是 profile,不是修复 | `p5b-results/blit-codex-v1.md` | +| `SEG_STAGE` 默认 32 MiB 装不下 128 MiB 上传:**决定 = 默认不改**,普查/Redmi 显式 256 MiB profile;更大 blob 的分块/专用 carrier 留 P8 设计(ROADMAP 开放问题 11) | `p5b-results/blit-codex-v1.md`;`MEASUREMENTS.md` §33 | | Magma(DirectVulkan)split compute/image 路径:89 个错答中 82 个 | `p5b-results/i1-v1.md` | -| rd12 DirectGLES `InitialBytesNotCarried/resource_respecify`;rd12 DirectVulkan `BarrierTimeout/Present` | `p5b-results/d1-codex-v1.md` | +| rd12 DirectGLES `InitialBytesNotCarried/resource_respecify`;rd12 DirectVulkan `BarrierTimeout/Present`;`iris-bsl-esc-menu-854` GLES 同 rd12 GLES;`create-indirect` VK 主机内存膨胀(守护杀死,两次复现) | 79 trace 普查 `counts.json` / `trace-transitions.json` | | RGB 三通道 CPU mip 回退 | `p5b-results/mip-codex-v1.md` | -| 设备 barrier tax 未测(此前每次 split 臂都停在 `DrawElements`) | `p5-results/ab-v1.md` | +| ~~设备 barrier tax 未测~~ **已测(2026-09-16)**:split−push 逐线程 CPU p50 +5.9% – +18.2%,逐例见 `MEASUREMENTS.md` §35 | `ab-tables.md` | | 27 个 P5 inproc 错答:纹理读回走 client-shadow 回退、P7 query 计数、一个检查 harness、一个 FBO/RBO 删除后生命期 | P4b / P7 / P6 债 | | `rsp` 残余输入;`SEG_REPLY` 2 MiB 上限;GetCaps 两个 blobref 的载体;PACK-PBO 读回真实形式 | P3b/P4b、P6+ | | 39 个未被任何负载命中的 class-C 槽(query / sync / indirect / 具名 FBO clear 等) | P5b wave 3 / P9 / P10 | | `test.yml`/`apk.yml` 里的 `feat/disaggregated` 触发器是临时的,合入 dev 前必须移除 | — | +| 设备钉频口径:Redmi `2f7cbe2e` 厂商 GPU 上限已消失,2026-09-16 起 pin 为 1100 MHz(原 1050),跨口径活动不可比钟频 | `pin_device.sh` 更新记录;`MEASUREMENTS.md` §35 | ## 6. 下一步 -1. 新头上跑一次完整普查(车道 + 79 个 trace),拿到真实的 Minecraft 渲染数与新的首阻塞表。 -2. 修 `SEG_STAGE` 默认容量。 -3. 重建三个 APK(pull / push / split),跑红米四臂 A/B:首次可测 barrier tax。 -4. host 全门一次 + 文档收口 → P5b 收官。 -5. 剩余首阻塞(Magma compute/image、rd12、RGB mip)一轮。 -6. P6 spawn transport。 +1. **P6 spawn transport**:替换 P5b 的 inproc 依赖(具名 blit scoped binding + barrier、mip descriptor 的 barrier-held registry 查询、FBO death 的 inproc mailbox——ROADMAP 债务表),`SocketTransport` + `ServerMain` + 握手/退出语义。 +2. 剩余首阻塞一轮(Magma compute/image、rd12、RGB mip、texture-remint-pull 仿真槽)。 +3. P6 出口门:P5b 的完整渲染路径在 `spawn` 下绿;OpenRA 在 Adreno 830 上 split SSIM ≥ 0.99。 ## 7. 记录位置 @@ -76,11 +79,14 @@ | P5 brief / 契约 / 前言 | `~/w7/notes/p5/BRIEF-P5.md`、`MobileGL/MG_Remote/CONTRACT-P5.md`、`~/w7/notes/p5/PACKAGE-PREAMBLE.md` | | P5 包报告与审查 | `~/w7/notes/p5/p5-results/`(`joint-v1.md` 全门记录、`ab-v1.md` 设备 A/B、`p5-close-codex-review.md`) | | P5b brief / 契约 / 报告 | `~/w7/notes/p5b/BRIEF-P5B.md`、`MobileGL/MG_Remote/CONTRACT-P5B.md`、`~/w7/notes/p5b/p5b-results/` | +| P5b 收官主机门 | `~/w7/p5b-final-host-348d22a4/`(`reconciliation-20260916.md`、`summary-counts.{json,md}`) | +| P5b 合并普查 | `~/w7/p5b-final-census-348d22a4/`(+ `-resume1/2/3`)、`p5b-results/joint-codex-v1.md` census 块 | +| P5b 设备证据 | `~/w7/notes/p5b/apk/p5bcodex2/`(APK + proof);`MobileGL/.trace-work/p5b-redmi/p5bcodex2/2f7cbe2e/`(correctness 8/8、benchmark `ab-tables.md` 与 bsl 补充表) | | class-C 普查 | `~/w7/notes/p6/census-classC.md`;基线 `~/w7/p5b-c0b-census-logs/results.json` | | 门日志 | `~/w7/p5-joint-gate.log`、`~/w7/p5b-quickgate.log`、`~/w7/p5-joint-evidence/` | | 脚本 | `~/w7/notes/tools/`(`wsl_p5_gate.sh`、`p5_ab_redmi.sh`、`wsl_build_p5_apks.sh`、`p6_census_*.{sh,py}`、`p5b-c0b-census.sh`) | -## 8. 裁定索引(ID-40..75;ID-1..39 见 git 历史) +## 8. 裁定索引(ID-40..77;ID-1..39 见 git 历史) | ID | 裁定 | |---|---| @@ -118,3 +124,5 @@ | 73 | P5 收官审查:1 blocker / 10 major / 2 minor → r1(核心)/ r2(CI) | | 74 | 配额中断期间由用户的 Codex root task 推进 P5b 第二波;不重启同名 Claude 包 | | 75 | P5b 整波落地推送 `7cb29d46`;快速门全绿;修掉一个测试日志捕获缺陷(库按进程截断日志,`RunInChild` 的增量读把第 2、3 个子进程的诊断读空) | +| 76 | P5b 收官:主机门(`348d22a4`)retrace-verify 以钉住库续跑合并 79/79、complete=true;79 trace 普查三轮续跑补齐(72/6/1);审查补遗追加钉定结果;**P5b 出口 = Redmi 正确性 8/8 + 四臂 A/B(barrier tax 首测)** | +| 77 | Redmi `2f7cbe2e` 钉频期望 1050→1100 MHz:2026-09-11 实测的厂商 thermal_pwrlevel 上限已消失,`pin_device.sh` 按 2026-09-16 实测更新;`iris-bsl` benchmark 8 组判为 fixture 123 帧上限(pull 同失败,非回归),123 帧序列折算补充表不进 200 帧尾门表 | diff --git a/docs/Disaggregated/MEASUREMENTS.md b/docs/Disaggregated/MEASUREMENTS.md index 58dfdd0e..71639e9e 100644 --- a/docs/Disaggregated/MEASUREMENTS.md +++ b/docs/Disaggregated/MEASUREMENTS.md @@ -842,9 +842,9 @@ E1 与 E3(a) 的控制步骤 rc=0,各自 selected entry 必须自己的诊断 **执行异常独立记账:**为归档 E1/E3 私有日志而在运行中追加 runner 行,Bash 的读取偏移触发过一次 `-test-dir: command not found`;外层未设置 set-e。该 shell 异常保留在原始会话输出,不冒充测试失败,也不能省略。verify / audit 自己的 JUnit 均完整且步骤 rc=0,后续 E2 正常;`negative-private-logs` 已提前手动归档。最终须用全部必需步骤状态、JUnit 数量及回放计数确认没有缺步,而不是仅凭最后一个 shell exit 宣称通过。 -主机 push / verify 的各 79 replay 结果与最终 complete/exit 尚待记录。 +主机 push / verify 的各 79 replay 与最终 complete/exit **已收口(2026-09-16)**:retrace-push **79/79**(原始会话内完成,rc=0);retrace-verify 在 WSL 重启前完成 4/79,其余 75 条以 `verify-recovery-r1/` 里 SHA-256 钉住的同一 verify 库串行续跑(`p5b_codex_resume_verify.py --run`,exit 0),合并 **79/79**(`retrace-verify-combined/summary.json`)。逐步对账无缺失步骤、无非零退出(`reconciliation-20260916.md`),`exit-code.txt=0`、`complete=true`,`summary-counts.{json,md}` 已按最终状态重算。 -合并 inproc 普查由独立 frozen runner 在 `~/w7/p5b-final-census-348d22a4/` 记录:integration lane 显式 **32 MiB**,完整 trace 显式 **256 MiB**。后者容纳目标负载的单次 128 MiB 上传;这不是默认容量修复。integration lane 已执行 **1267 selected = 811 passed + 203 skipped + 62 aborted + 191 failed**。旧 1149 名全部保留,新增 118、删除 0;旧 **432 passes 全保留、零回退**。旧 505 abort → 265 passed / 18 skipped / 58 aborted / 164 failed;旧 27 failed → 1 passed / 26 failed。后续错误被执行到不等于这些路径已正确,新增测试也不计入旧名回归判断。完整 trace 的 79 项仍在运行;最终同名 transition、逐 trace first blocker/SSIM 以 `joint-codex-v1.md` 的 census 块及 `identity.json`、`counts.json` 为准。 +合并 inproc 普查由独立 frozen runner 在 `~/w7/p5b-final-census-348d22a4/` 记录:integration lane 显式 **32 MiB**,完整 trace 显式 **256 MiB**。后者容纳目标负载的单次 128 MiB 上传;这不是默认容量修复。integration lane 已执行 **1267 selected = 811 passed + 203 skipped + 62 aborted + 191 failed**。旧 1149 名全部保留,新增 118、删除 0;旧 **432 passes 全保留、零回退**。旧 505 abort → 265 passed / 18 skipped / 58 aborted / 164 failed;旧 27 failed → 1 passed / 26 failed。后续错误被执行到不等于这些路径已正确,新增测试也不计入旧名回归判断。完整 trace 的 79 项**已收口(2026-09-16)**:**72 passed / 6 aborted / 1 failed**。主跑在 WSL 重启时止于 73/79,续跑三轮补齐——resume1 命中 `create-indirect` DirectVulkan 的内存膨胀(进程组 >60 GiB RSS,守护 SIGKILL);resume2 重试同例再次被内存守护杀死(本条记为 failed,证据在案),其余 5 条因内存水位未恢复被守护推迟;resume3 在干净实例上跑完(4 passed / 1 aborted)。7 条未过项及其首阻塞:`minecraft-1.21.4-rd12-odinlite-in-world` DirectGLES `Fatal{InitialBytesNotCarried,"resource_respecify"}` 与 DirectVulkan `Fatal{BarrierTimeout,"Present"}`;`iris-photon-v1.3b`、`iris-derivative-main-d24.4.14`、`minecraft-1.21.1-neoforge-create-indirect` 三个 DirectGLES 均为 `Fatal{UnmigratedEmulation,"texture-remint-pull"}`;`minecraft-1.21.4-fabric-iris-bsl-esc-menu-854` DirectGLES `Fatal{InitialBytesNotCarried,"resource_respecify"}`;`create-indirect` DirectVulkan 为内存守护杀死(llvmpipe/lvp 上的真实膨胀,两次复现)。通过项含 `improved-transparency-minecraft-26.3` DirectGLES SSIM 1.0 / DirectVulkan 0.999914、`iris-iterationrp` DirectVulkan 0.995833、`iris-bsl-esc-menu-854` DirectVulkan 0.998402。逐 trace first blocker/SSIM 以 `joint-codex-v1.md` 的 census 块及 `identity.json`、`counts.json`、`trace-transitions.json` 为准。 ## 34. P5b 唯一收官审查与定向修复 @@ -856,12 +856,29 @@ E1 与 E3(a) 的控制步骤 rc=0,各自 selected entry 必须自己的诊断 | Major 2 | ClientWaitSync 保留 64-bit 原 timeout,但 applied/reply 等待一律 30 秒,合法长 wait 会被 BarrierTimeout 打断 | 集成 `82683d4a`(包 `6388035f`):applied/reply 预算为 ceil(timeout ns / 1,000,000) + 30,000 ms,以有限 chunk 避开溢出和 forever sentinel;普通容量等待/FenceWaitServer 仍为 30 秒,shutdown 可唤醒 | | Minor 3 | ReadPixels exact-size reply 的未知 status 仍可穿过 production helper | 集成 `82683d4a`(包 `6388035f`):tight 与 bounce 实际 return path 拒绝 status=3,报 ReplyStatusInvalid;既有 ERROR/DECLINED 诊断保留 | -`6388035f` 的定向 RemoteClientTest **7 selected / 7 passed / 0 skipped / 0 failed**(80 ms):真实 EmitAndWait 的 0 ns、1 ns、60 s、UINT64_MAX 预算,FenceWaitServer、shutdown,以及 tight/bounce 的未知状态控制。报告 `~/w7/notes/p5b/p5b-results/wait-codex-v1.md`;该结果属于后续修复包;index span 的报告为 `indexspan-codex-v1.md`。最终代码源头 **`82683d4a83b5c8f4f7c375a7a92ebee9a1854646`** 包含三项修复,合并后定向确认待集成者汇总。 +`6388035f` 的定向 RemoteClientTest **7 selected / 7 passed / 0 skipped / 0 failed**(80 ms):真实 EmitAndWait 的 0 ns、1 ns、60 s、UINT64_MAX 预算,FenceWaitServer、shutdown,以及 tight/bounce 的未知状态控制。报告 `~/w7/notes/p5b/p5b-results/wait-codex-v1.md`;该结果属于后续修复包;index span 的报告为 `indexspan-codex-v1.md`。最终代码源头 **`82683d4a83b5c8f4f7c375a7a92ebee9a1854646`** 包含三项修复。**合并后定向确认已汇总(2026-09-16)**:`7cb29d46` 之前最后一次 quickgate 里 split 单元车道仅有的 2 个失败(`PipeWireCodecTest.UserIndexSpan*`)是测试日志捕获缺陷(库按进程截断日志、fork 子进程增量读读空),由 `7cb29d46` 修复;在 `c77831e0` 的 build-split 上 `PipeWireCodecTest.UserIndexSpan*` **3/3 通过**,三项修复在最终头上均有绿色定向证据。 本阶段不再做第二轮全门或收官审查。原始全门的源头仍为 `348d22a4`,后续三项只以修复提交上的定向证据补齐;最终 APK/设备源头另行明确,不能倒改历史 gate 身份。 -## 35. P5b Redmi 出口与四臂 A/B(待完成) +## 35. P5b Redmi 出口与四臂 A/B -最终代码源头 **`82683d4a83b5c8f4f7c375a7a92ebee9a1854646`** 正在构建 pull / push / split 三个 APK,split APK分别运行 monolith control(splitctl)与 inproc(split)。四条目标 trace × 双后端共 **8 个正确性组合**;四臂性能共 **32 个组合**。全部显式使用 **`MOBILEGL_IPC_STAGE_MB=256`**,默认 32 MiB 保持不变。运行前检查源头与 APK/library 身份,使用独立 attempt 目录保留正确性 SSIM、Fatal 日志与性能数据。 +最终代码源头 **`82683d4a83b5c8f4f7c375a7a92ebee9a1854646`**,APK 相位 `p5bcodex2`(pull / push / split 三个签名 APK,provenance 与 proof 在 `~/w7/notes/p5b/apk/p5bcodex2/`),split APK 分别运行 monolith control(splitctl)与 inproc(split)。设备 Redmi M332BF(SM8750 / Adreno 830v2,串号 `2f7cbe2e`),证据根 `MobileGL/.trace-work/p5b-redmi/p5bcodex2/2f7cbe2e/`。全部组合显式 **`MOBILEGL_IPC_STAGE_MB=256`**,默认 32 MiB 保持不变(容量决定见 §33 与 ROADMAP 开放问题 11)。**设备钉频口径变更**:2026-09-11 记录的厂商 GPU 频率上限(thermal_pwrlevel 锁 1、1050 MHz)在本机已消失,2026-09-16 实测 deterministic pin 为 **1100 MHz**(`pin_device.sh` 已按实测更新);本节数字与 1050 MHz 时代钉频的活动不可直接比钟频,仅同场四臂配对可比。 -最终 sourcehead 已固定,设备尚无 DEVICE_DONE,**本节不填结果、不标 P5b 收官,也不从主机 SSIM 推断设备成功**。设备实际 selected/passed/skip、每个组合的 SSIM、barrier tax 与逐线程 CPU 汇总待同源证据到齐后填写。性能仍只记录,不作 landing 阻塞门;P6 spawn 要在设备出口之后开始。 +**正确性矩阵 8/8**(4 条目标 trace × 双后端,inproc split 臂,逐组钉频前后取证、PNG/target_call/SSIM 阈值、inproc + apply 线程 + 正 wire 记录三证,skip 即失败):`improved-transparency-minecraft-26.3`、`minecraft-1.21.4-in-world`(GLES SSIM 0.999995)、`minecraft-1.21.4-fabric-sodium-in-world`、`minecraft-1.21.4-fabric-iris-bsl-in-world` 双后端全部通过。**这是四条 A/B trace 首次在 Redmi 上以 inproc 独立 apply 线程渲染——P5b 的出口判据(BRIEF-P5B §5)达成。** + +**四臂性能 A/B(barrier tax 首次实测)**:32 组中 **24 组带 200 帧尾验证全绿**(improved-transparency / in-world / sodium 三例的全部组);配对口径为三次重复取 wall-time 均值最低者、尾 200 帧(`ab-tables.md`)。逐线程 CPU p50 的 push−pull 与 **barrier tax(split−push)**: + +| trace | 后端 | push−pull CPU p50 | barrier tax CPU p50 | barrier tax 帧 p50 | +|---|---|---:|---:|---:| +| improved-transparency-26.3 | DirectGLES | +15.6% | **+10.3%** | +0.1% | +| improved-transparency-26.3 | DirectVulkan | +8.8% | **+13.1%** | +13.3% | +| minecraft-1.21.4-in-world | DirectGLES | +21.4% | **+18.2%** | +0.2% | +| minecraft-1.21.4-in-world | DirectVulkan | +11.8% | **+17.9%** | +19.7% | +| minecraft-1.21.4-fabric-sodium | DirectGLES | +10.9% | **+5.9%** | -0.1% | +| minecraft-1.21.4-fabric-sodium | DirectVulkan | +7.6% | **+8.3%** | +4.3% | + +splitctl−push 全部在 ±1.6% 内(monolith control 与 push 同源等价),证明上述增量来自 inproc 传输与 barrier 而非 APK/构建差。p99 方向同向放大(sodium DirectVulkan 帧 p99 +107.7% 为离群尾帧,原始序列在 `ab-tables.md`)。inproc 臂 peak RSS 389 MiB–2.5 GiB、全角色映射 560.5 MiB(256 MiB × 角色视图是虚拟映射容量,不是 RSS 增量)。 + +**fixture 受限的 8 组**:`iris-bsl-in-world` 全部四臂 × 双后端验证失败,原因是 fixture 本身只有 **123 个 benchmark 帧**,低于跑器的 200 帧尾规则——pull 臂同样失败,是 fixture 上限不是回归。保留的 123 帧完整序列按同法(三次取均值最低)单独折算成带标注的补充表 `ab-tables-bsl-123frame-supplement.md`(全程 123 帧、无尾裁剪;p99 在各臂均被着色器编译主导,与 P2 基线记录一致):barrier tax CPU p50 DirectGLES **+7.1%**、DirectVulkan **+9.1%**,不混入上表。 + +性能仍按 2026-09-08 口径只记录、不作 landing 阻塞门。设备出口完成,**P5b 收官**;P6 spawn transport 自此开始(其 inproc 依赖替换清单见 ROADMAP 的 P5/P5b 债务表)。 diff --git a/docs/Disaggregated/ROADMAP.md b/docs/Disaggregated/ROADMAP.md index 78fecb27..316820e0 100644 --- a/docs/Disaggregated/ROADMAP.md +++ b/docs/Disaggregated/ROADMAP.md @@ -1,6 +1,6 @@ # MGPipe 路线图 -> 状态:**P0、P0.5、P1、P2、P3a、P4a、P5 已落地;P5b 代码已落地(`feat/disaggregated@7cb29d46`),测量未收口**。当前头、逐门数字、开放项与下一步见 **[`CURRENT_STAGE_PROGRESS.md`](CURRENT_STAGE_PROGRESS.md)**(随每次落地更新)。P5b 收官仍需:新头上的完整普查、一次主机全门、APK 与红米 A/B。P6 排在四个目标 trace 的红米 `inproc` 渲染之后。设计见 `ARCHITECTURE.md`,分头证据见 `MEASUREMENTS.md` §26–35。 +> 状态:**P0、P0.5、P1、P2、P3a、P4a、P5、P5b 已收官**(2026-09-16,头 `c77831e0`)。当前头、逐门数字、开放项与下一步见 **[`CURRENT_STAGE_PROGRESS.md`](CURRENT_STAGE_PROGRESS.md)**(随每次落地更新)。P5b 出口:主机全门 `348d22a4` complete=true、合并普查车道零回退 + 79 trace 72/6/1、Redmi 正确性 8/8 + 四臂 A/B barrier tax 首测(`MEASUREMENTS.md` §33–§35)。**下一个是 P6 spawn transport**。设计见 `ARCHITECTURE.md`,分头证据见 `MEASUREMENTS.md` §26–35。 ## 通用纪律(每个 commit) @@ -19,7 +19,7 @@ | **P3a** handle wave 1(Espryt):buffer、VAO | 18–23 | ✅(`fde5fda3`,44 个提交,`git diff --stat 5cb826b0 3e298c9a` = 37 文件 / +9273 / −230)**九条 `resource_*` 调用**接线:`ResourceCreate`、`ResourceRespecify`、`ResourceSubData`、`BufferSubDataResident`(`kOptional`,Magma 仍不注册)、`ResourceFlushRange`、`ResourceReadback`、`ResourceDestroy`、`MapPersistent`、`UnmapPersistent`——全部在 GL 调用时刻从 `BufferObject` 的十一处分发点发射(`ARCHITECTURE.md:157` 的唯一例外),落到新的句柄形后端表 `MGPipeResourceOps`(`MobileGL/MG_Pipe/PipeApply.h`,签名里没有任何 `MG_State` 类型);Espryt 的 `Ops_*` 行为逐条不变,只换了读输入的地方。**五条 vertex-input 调用**:`CreateVertexElements`/`BindVertexElements`/`DeleteVertexElements`(blob 两个视图都带,`MGPVertexAttribWire[]` + `MGPVertexBindingPointWire[]`,`ARCHITECTURE.md:132`)、`SetVertexBuffers`(`BaseInstance` 显式字段,取代 `g_pendingFetchBaseInstance` 那个 ambient 全局)、`SetIndexBuffer`。**第七张 Espryt slot 表**:`GLESBufferResource` 搬出 `PipeResource::m_backend`,进 `BackendSlotTable`(`MobileGL/MG_Backend/DirectGLES/Managers.h:691-692`)——第一张按 client 铸造、随调用过线的句柄索引的表。`kNeedsAck` 首次落到目录里(`ResourceRespecify`,逐记录谓词 `MGPipeResourceRespecifyNeedsAck(desc) == (desc.Immutable != 0)`,`MobileGL/MG_Pipe/MGPipeTypes.h:680`)。pool、延迟释放与三条 ring 原样搬(G5 十个函数逐字节相同);Adreno 禁用属性 SIGSEGV workaround 保留。**memo 普查(`ARCHITECTURE.md` §9.5)**:句柄臂上**退役 6 条身份 memo 成员**——VAO twin 的 `m_hasSyncedConfigVersion` / `m_syncedConfigVersion` / `m_syncedAttributeVersions`(`Array`,本阶段最大的一处)/ `m_syncedIndexBufferVersion` / `m_syncedIndexBufferObject`(裸前端指针),加 `ConvertedFloat64Stream::sourceLifetimeId`(即普查里 11 条直接删除的最后一条,`ConvertedVertexStreamKey` 的 `sourcePin`)。六条都**仍在 `MOBILEGL_PIPE_LEGACY_MEMOS` 下编译**(`Managers.h:1109-1130`、`:1067-1075`),pull 构建强制该开关 ON,所以 `sizeof` 一处不动——G1 的 0/0/0/0 就是这条的度量,真正的删除随 pull 路径在 P13 发生;**4 条重键** —— twin 的同步门(config version + 32 组逐属性版本 → `{elementsHandle, elementsSerial}` + `VertexBuffersSerial`)、twin 的索引槽 memo(回绕 `Uint16` + 裸 `BufferObject*` → 一个 `Uint64 m_syncedIndexSerial`)、`ResolvedDrawBuffers`(`configVersion` → `{elementsHandle, elementsSerial, buffersSerial}`,`Entry` 与 `iboFrontend` 各加 `MGPipeHandle`)、`ConvertedFloat64Stream`(前端 lifetime id + change serial → buffer `{slot, gen}` + applier `Serial`),另 `GLESBufferResource::syncedChangeSerial` 从镜像 `BufferObject::GetChangeSerial()` 改为镜像 applier 的 `Serial`;**保留不删** —— `g_pendingFetchBaseInstance` / `SetPendingFetchBaseInstance` / `GetPendingFetchBaseInstance` / `ScopedFetchBaseInstance` 与它的三个 scope 仍在 `MOBILEGL_PIPE_LEGACY_MEMOS` 下编译(`Managers.h:1189-1200`、`DirectGLES.cpp:5293`),因为真删会从 pull 构建移走两个符号 = 直接的 G1 破坏,计划里"grep 为空"那条在 P3a **不可达**;`PipeResource::m_backend` / `SetBackendResource` / `ReleaseBackend` / `BackendBufferResource` 同理(D-K,`ARCHITECTURE.md:286`),push 下只是不再被写,随 pull 路径在 P13 退役。**`map-persistent-roundtrips`(`mpr`)**:定义为**每一次 `MapPersistent` 发射,铸成或拒绝都算**(`ARCHITECTURE.md:485`),所以 monolith 下非零、可断言。子系统位 7(resources)与位 8(vertex input),push 默认 `0x7f` → **`0x1ff`**(`kMGPipeSubsystemsMigratedAtP3a`) | ✅ 五部分门(本地 `~/w7/pipe`):**G1** pull 符号 0 增 / 0 删 / 0 重命名 / **0 resize**、`.text` 10806323 字节不变(P3a 的认定 resize 集为空);**G5** 十个 pool / 延迟释放 / ring / flush-drain 函数对 `44c2b5cf` **与** `5cb826b0` 都逐字节相同,self-test 两个阴性对照(`ClearBufferPool`、`FlushPendingRangesNow`)都按名变红;`RenderStateImpl` sha 仍不变;**G2** pull 与 push 逐名相同(名差 0);**G14** 测试名 0 删除 / **+58**;单元 **1619** × {pull, push, verify};`integration-gpu` **958/958** × {pull、push、`MOBILEGL_PIPE_PUSH=0`、`0x7f`(G12 的子系统关闭臂)、`MOBILEGL_ESPRYT_DISABLE_INVALIDATE_FLUSH=1`};buffer/VAO 族 **202/202**;`RenderStateSpans`/`Residual`/`VertexInputEmit`/`ResourceEmit` **48/48**;`HandleRecycle`(verify)**60/60**,含新的 buffer 用例三臂;`CsoContentAddressing` + `ResourceSubsystemControl` **10/10**,controls **64/64**;**G7** 两个阴性对照都按设计变红,vertex-input 那个**点名 `IsBgra`**;`integration-verify` **842/842**,零 `Fatal{`;`gen_pipe` 与 `gen_pipe_dirty_surface`(scan root 已扩到 `MG_State/GLState`,75 个 mutator 全映射、0 COARSE / 0 UNDECIDED)`--check` + `--self-test` 全绿。79 例 retrace:push 下 **79/79**,`MOBILEGL_PIPE_VERIFY=1` 下 **79/79 全部 armed、零分歧、零 `Fatal{`**;G3b 的具名五条都在这两次扫描里通过,**但单独那次具名扫描因门脚本把正则写成了逗号清单而选中 0 例**,且设备侧仍按开放问题 17 排除 `create-indirect`,所以 G3b 记为"桌面全绿、设备侧部分"——详见 `MEASUREMENTS.md` §16。**性能只记录不设门(用户 2026-09-08 规则 (a))**:MC 26.3 在 Adreno 上的 p99 对与两机 p50/p99 表见 `MEASUREMENTS.md` §20。**再基线检查点 1:实际日历 1 天(2026-09-08,四个包),远低于 27 天,不触发重定基线** | P2 | | **P4a** handle wave 2(Espryt):FBO / 纹理 / sampler / program 身份与描述符 | 26–34 | ✅(`8c458cd5`,101 个提交,`git diff --stat 37da3c3a 8c458cd5` = 86 文件 / +30066 / −384)**十四条族调用接线**:`set_framebuffer_state`、`create/delete_sampler_state`、`create/delete_sampler_view`、`set_texture_params`、`set_sampler_views`、`bind_sampler_states`、`set_shader_images`、`create/delete_shader_state`、`set_draw_program`/`set_dispatch_program`、`set_global_constants`;纹理与 renderbuffer 的 create/respecify/subdata/destroy **复用 P3a 的四条 `resource_*` 行**(D-D1),所以目录仍是 **71 条,P4a 一行未加**。**六种 kind 按 `{slot, gen}` 重键**:Texture、Renderbuffer、Framebuffer、SamplerCso、SamplerViewCso、ShaderCso——其中 sampler **state** 内容寻址(容量 256、引用计数防 LRU 驱逐掉仍被 `MGPTextureParams::BuiltinSampler` 指着的项),sampler **view** 按纹理对象身份寻址(D-F2),framebuffer 只有句柄没有 wire 生命期(D-I2)。子系统位 **9(framebuffer)/ 10(纹理资源)/ 11(sampler)/ 12(program)**,`MOBILEGL_PIPE_PUSH` 默认 `0x7f`→`0x1ff`→**`0x1fff`**。`CompositeResolver` 落地(program pipeline 解析成保留段里的一条 shader CSO,按 `(ContextId, 管线名)` 记忆——进程级单例配每上下文 GL 名,是复审在真实 make-current 序列上打出来的)。**契约改了七次才对**(`c0b`…`c0g`):birth 半边 hook 与发布 latch、`wants()` 看 wired 常量、四个缝的编码一次性写死(`MGPSubData::Target` 低字节资源目标 + 高字节上传目标、`DepthStencilMode` 0/1、`MGPSurface::Kind`、`Pad0`→`TextureTarget`)、Tracker 两个看不见自己主体的快门(`glBindSampler` 只动位 12 的世代、SSO 下 `GetCurrentProgram()` 恒 null)、`MGPipeFramebufferTarget::Named = 3`(**记录改按 framebuffer 句柄存**:原设计只存两个"当前绑定"记录,于是 `BlitNamedFramebuffer` / `ClearNamedFramebuffer*` 在句柄臂上打进一个从没拿到附件的 FBO)、**消费者门**(四族必须"某后端注册了 `MGPipeResourceOps`"才发射——Magma 没有 P4a twin,客户端却按 acceptance 清了 dirty,直接让 66 条 DirectVulkan 用例丢上传)、**客户端侧 D-K2 依赖表**(位 10 要位 7 和位 11,位 9 要位 10;只在服务端拒绝时客户端已经把标记清了)。emulation 在 split 下显式 Fatal 直到 P8(`MGPipeUnmigratedEmulation` 在 `Managers.cpp` 2 处、`DirectGLES.cpp` 4 处) | ✅ 全门(`6035c9d7` 全量 + `8c458cd5` 上复跑):**G1** pull 符号 0 增 / 0 删 / 0 重命名 / 0 resize、`.text` 字节不变(P4a 认定 resize 集为空;Espryt 侧靠预处理器宏而非 lambda/局部量改写——插一个 lambda 就会把同函数里九个既有 `$_N` 全部重编号);**G5** P3a 的十一函数 + P4a 自己的 **17 个区**(`scripts/p4a_untouched_regions.sh`,8 个阴性对照全部按名变红);**G2** pull 与 push 逐名相同 **2902**;**G14** 0 删除 / **+314**;单元 **1785 × 3**;`integration-gpu` **1117/1117 × 七臂**(默认 `0x1fff`、`0x1ff`、`0`、`0x9ff`、`0x5ff`、pull、`ESPRYT_DISABLE_INVALIDATE_FLUSH=1`),其中 DirectVulkan **559/559**;`integration-verify` **920/920 零 `Fatal{`**;79 例 retrace 在 verify 臂 **79/79 全 armed 零分歧**、push 臂 **79/79**、G3b 具名 **12/12**;**八族拒绝普查 = 0**(按族逐条 grep 服务端拒绝句,工具 `wsl_p4a_refusal_census.sh`;`ctest -V` 的普查是假零——console sink 被编译掉了,必须逐用例取自己的日志)。**G9 的"落地前必须红"没能通过公共 GL 达成**:回读模拟自己会设 `GL_DEPTH_STENCIL_TEXTURE_MODE`,`IsDrawSyncClean` 又在首次采样时推参数,所以该场景改成**白盒断言**(新增 `MG_IntegrationTest/Harness/PipeApplyPeek.{h,cpp}` 直接读 applier 的参数记录 + Espryt 已应用状态,变异下 4/4 变红),D 的 `SanityTest` 另加一条覆盖"推迟到首次取视图"的那半。真正红过再绿的是终审抓出的两条:per-level respecify 丢上传(`L0; draw(other); L1; draw(T)` 在 `0x1fff` 下读回全黑、`0x1ff` 下正常)与 delete-then-draw(`glTexImage2D; glDeleteTextures; draw` 在句柄臂 SIGABRT `pure virtual method called`)。**CTS `direct_state_access.framebuffers*` / `packed_pixels`(G15)未跑**,判在关键路径外,随 P3b/P4b 补。**再基线检查点 1b:实际 1 天(2026-09-08 起,六包并行 + 契约七修 + 两轮终审修复),远低于 39 天,未触发** | P3a | | **P5** 传输 + inproc applier + 发射表 | 12 | ✅(`ff2994d9..37fc4fdb`)同一 codec 上的 `InProcessTransport`;发射表、caps/reply;apply-thread context;lockstep barrier;tight ReadPixels;persistent-map 块推送;八包及 j0/x2/v1-r3 收尾 | 历史 joint:OpenRA 双后端 2/2、SSIM 1.0。收尾头:G1 0/0/0/0、.text +0,unit 1817×3 / 2086,push 1128、split-monolith 1149、reduced 22(含 2 skip)均零失败;**最终全门在 E3(a) 停止,Part 2/4 未到达**。收官审查 1 blocker / 10 major / 2 minor 转 r1/r2;证据见 `MEASUREMENTS.md` §31 | P4a | -| **P5b** `inproc` verb migration(收尾中) | 按首阻塞迭代 | d1 19、i1 7、t2 6、f1 11 槽已迁移;新增具名 blit lowering、GLES mip descriptor 路径、五槽 sync;P5 收官 r1/r2 已合入。合并头 `348d22a4`:A=2 / B=54 / C=15 | 主机 split 107 selected = 105 passed + 2 skipped;一次全门、合并普查与审查定向修复分别记账,见 `MEASUREMENTS.md` §32–34。Redmi 四 trace × 双后端正确性及四臂 A/B 尚待最终证据;256 MiB stage 为显式 profile,默认仍为 32 MiB | P5 | +| **P5b** `inproc` verb migration | 按首阻塞迭代 | ✅ d1 19、i1 7、t2 6、f1 11 槽已迁移;新增具名 blit lowering、GLES mip descriptor 路径、五槽 sync;P5 收官 r1/r2 已合入。合并头 `348d22a4`:A=2 / B=54 / C=15;收官审查修复 `a021e3cc`/`82683d4a` | ✅ 主机 split 107 selected = 105 passed + 2 skipped;主机全门 `348d22a4` **complete=true**(retrace-push/verify 各 79/79);合并普查车道 1267 = 811/203/62/191 对 c0b 零回退、79 trace **72/6/1**;**Redmi 正确性 8/8(四条 A/B trace 双后端 inproc 渲染)+ 四臂 A/B 24/32 组 200 帧尾全绿、barrier tax 首测**(`MEASUREMENTS.md` §33–35);iris-bsl 8 组为 fixture 123 帧上限,补充表另记。256 MiB stage 为显式 profile,默认仍为 32 MiB | P5 | | **P6** spawn transport(后移) | 5 | `SocketTransport`(socketpair + fork/execve,envp 剔除 + 强制 monolith 双保险);`ServerMain`;`MOBILEGL_IPC_SERVER_PATH` + `dladdr` 兜底;有界重试握手;EOF 即时退出;device-lost latch | P5b 的完整渲染路径在 `spawn` 下绿;进程树只多一个子进程;`HeadlessGL` fork 预检无孤儿;OpenRA 在 Adreno 830 上 split SSIM ≥ 0.99 | P5b | | **P3b / P4b** 深化(Espryt) | 29–38 | **P4a 已经付掉的,别再排进来**:`ResolvedDrawBuffers` 重键(P3a 就做了)、Tracker 的集合 hash 抑制器(三个 unit set 各自带内容 hash,clientsp)、`g_unitTextureSyncList` 那条 unit-bindings epoch(E 的验证轮换成 sampler set serial,顺带重键四条下游 memo)、`MGPSubRegion` 的跨步描述符(P4a 的 `resource_subdata` 已经逐区携带 `SrcOffset`/`SrcRowStride`/`SrcSliceStride`)。**仍然欠着**:按存储属主键控的发射游标与 index 重映射(dirty 归属反转,P4a 只落了 drain list);`g_fboTextureSyncList`;`ResolvedTextureBindingMemo` / `SamplerPassMemo` / image sweep / program registry 的重键;XFB scatter 搬到 client;删 fragColor 重推导 workaround 与 `g_broadcastMemo*`;**raw-depth-fetch sampler 原生化**(`g_rawDepthFetchSamplerState` 至今是 `MG_Backend` 里的一个前端 `SamplerObject`,是句柄臂上唯一一处有意保留的前端读——P4a 终审的 R-6);回读 / pack state;外加 P4a 记下的 R-3(三处只活在包头里的编码收进契约)、R-4(`UseProgram`/`BindVertexArray` 两行的 G9 推导)、R-5(D-K2 依赖表两侧各一份,要合成一处)、R-7(三通道 CPU mipmap 重武装缺口)、R-10(六种新 kind 的 ABA 对照目前是惰性的,缺一个消费者 `if`)、R-11(`TextureUploadShapeScenario` 仍是"只记录不设门") | ~25 个纹理场景、21 个 program 场景 + `MG_Test/ShaderTranspiler`;两台设备 `KHR-GL46.texture_*`/`internalformat.texture2d.*`/`shader_image_*`/`packed_pixels` 在 pull 基线 0.5 pp 内;每一个 Iris trace;**`TextureUploadShapeScenario`**(形状金标,Mali 帧时增量必须发布);view/owner 发射游标别名场景;verify 保留模式下 subdata 形状逐项相等;XFB 场景 + `capture_special_interleaved_test` | P4a | | **P7** DirectVulkan(Magma)全量迁移 | 80–104 | §5.5 其余 10 个子系统(子系统 1、4 已在 P2):`SetupDrawSnapshot` 探测字段塌成 dirty mask;占位纹理原生化(~120 行删除);具名 UBO host payload(D-B8,`kCapNeedsHostUboBytes`);blit/depth-mipmap 内部 shader 烘焙 + 新鲜度测试;`VertexInputStateFactory` 裸指针写回删除;D18 容器纪律原样保留 | 集成 + 40 trace 在 Magma 的 push 与 split 下全绿;verify 零分歧;**`nm -D libMobileGLServer.so | grep glslang` 为空**;Iris trace 上 `stage-ubo-named` 逐帧字节发布;两台设备 CTS 0.5 pp 内。**再基线检查点 2:中点(第 40–52 工作日)完成子系统 < 40% 立即重定基线** | P0.5、P2;可与 P5/P6/P8 并行 | @@ -55,7 +55,7 @@ P5 的八个实现包(报告在 `~/w7/notes/p5/p5-results/`): - **P5 出口(2026-09-16)**:缩减路径首个 IPC 帧已经观察到;joint、落地快门、收尾头实跑分别记在 `MEASUREMENTS.md` §26/31。收尾头 `37fc4fdb` 的 E3(a) 控制因两条设计性 skip 失败;不能以早期 joint 或各包自门替代未完成的最终全门。红米 P5 四臂 A/B 的 split 均停在索引 draw,barrier tax 未测(`MEASUREMENTS.md` §30),迁移与重跑归 P5b。 - 原“第 104 天跨进程帧”后移到 `inproc` verb migration 之后;目标先是完整 separate-thread rendering,再是 separate-process transport(ID-66)。第 145 天全功能 split与第 187 / 267 天纯度门仍是方向,不据此伪造新日历。 -- **P5b 出口(待完成)**:主机迁移与阶段门不代替 Redmi 渲染证据;唯一收官审查后的定向修复不触发第二轮全门/审查。四臂统一采用 256 MiB stage profile,原始主机门固定在 `348d22a4`,最终设备源头另记。 +- **P5b 出口(2026-09-16,已达成)**:唯一收官审查(0 blocker / 2 major / 1 minor)的定向修复以 `a021e3cc`/`82683d4a` 的靶向证据补齐,未触发第二轮全门/审查。主机全门固定 `348d22a4`:31 步原始 rc=0 + retrace-verify 以钉住库续跑合并 **79/79**,complete=true;合并普查车道对 c0b 零回退、79 trace **72 passed / 6 aborted / 1 failed**。设备源头 `82683d4a`(APK `p5bcodex2`):四臂统一 256 MiB stage profile,**Redmi 正确性 8/8**——四条 A/B trace 双后端首次在设备上 inproc 渲染,出口判据(BRIEF-P5B §5)达成;四臂 A/B 24/32 组 200 帧尾全绿,**barrier tax 首测**:split−push 逐线程 CPU p50 +5.9% – +18.2%(`MEASUREMENTS.md` §35)。iris-bsl 8 组为 fixture 123 帧上限(pull 同失败,非回归),补充表另记。 ## 第 43 天 GO/NO-GO 清单