From 19a96929aaf6b3fc9e2c1682a5a50538068f0e24 Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Thu, 8 Oct 2026 15:26:52 -0400 Subject: [PATCH] [Docs] (P15): handoff with the cpuhunt/gpuhunt references, the apply-thread breakdown and the open guilty-check decision. --- docs/Disaggregated/notes/perf-p15/HANDOFF.md | 80 ++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/docs/Disaggregated/notes/perf-p15/HANDOFF.md b/docs/Disaggregated/notes/perf-p15/HANDOFF.md index 715762c3..3025b4b9 100644 --- a/docs/Disaggregated/notes/perf-p15/HANDOFF.md +++ b/docs/Disaggregated/notes/perf-p15/HANDOFF.md @@ -8,6 +8,86 @@ The plan and its measurements are in [PLAN-P15.md](PLAN-P15.md); the audit is in ms/frame), dev measured in the same session, ~5 % noise. - GPU scene (Iris + BSL): fps within ~5 % of MobileGlues on both backends. +## Latest (2026-10-08, after S0) + +Every number below carries its profile and passed the validity check (`state.txt`). `cpuhunt` = +CPU about 1.5/1.25 GHz, GPU 903 MHz (cleanly CPU-bound); interval 0, anland off, daemons stopped. + +- **The S0 milestone's absolute numbers are superseded.** The perf stack's `msm_performance` caps + (787 / 1286 / 1075 / 1248 MHz) were clamping the CPU under the pin for some of that session. Only + same-session deltas from it stand. Measurement now uses `bench_session.sh` and the sampler (PLAN + ยง1), and the probe reports only clean fps windows taken before any tracing (`P15PROBE + trace-start` marker, 25 s settle). +- **FCL vanilla 1.21.5, cpuhunt, presenting-thread CPU ms/frame:** + + | build | Espryt | Magma | + |---|---|---| + | dev | 1.76 | 1.60 | + | p15k (S0 + VAO shadow) | 2.10 | 2.03 | + | p15l (+ vertex-elements dedup) | 2.10 | 2.08 | + + MobileGlues: 1.58 in an earlier cpuhunt session (needs a same-session re-run with clean windows). + Floor gap: Espryt +0.34, Magma +0.43 ms. +- **Driver-call redundancy:** + - Measured with a diagnostic build that counts every host GLES/EGL call and redundant re-sets + (`p15diag` worktree, never committed; HostCount.inl and VkCount.cpp). + - Espryt sent 3717 host calls/frame against MC's ~874: 2118 `glDisableVertexAttribArray`, 378 + enable, 378 divisor, all re-sets. + - Two fixes, each independently removes the walk churn: + - b4e209e1: a shadow of each driver VAO (850 calls/frame); + - c8a5abe5: the client no longer re-creates an identical vertex-elements record on every + `glBindVertexBuffer`. With the shadow off it takes 3724 down to 1228. + - CPU gain is small (about 0.1 ms): the calls were cheap in the driver. + - Magma issues about 380 Vulkan calls/frame with essentially none redundant. +- **Where Espryt's gap to dev is now:** the driver time equals dev's (0.50 vs 0.48). The excess is + libMobileGL itself, 0.75 vs 0.32: client half 0.51, backend 0.24, applier 0.02. The client half + is spread thin (validate, tracker, emitters, residual copy): S1's draw-delta. +- **Inproc (cpuhunt):** + - Espryt reaches 306 fps vs MobileGlues about 319; GL thread 1.68 ms, apply thread 1.83 ms of a + 3.27 ms frame. + - Neither thread is saturated. The apply thread waits in `queueBuffer` on a GPU fence + (present pacing), and the GL thread waits on the apply thread. + - `MOBILEGL_IPC_PRESENT_CREDIT=2` changes nothing (300 fps). + - Beating MobileGlues on inproc needs a present-path change (stage P territory, dropped by the + user), not CPU work. +- **S0b:** the fixture `minecraft-1.21.5-vanilla-fcl-in-world` is landed (4e27342e) and is in the + SSIM gate as `fcl` (32/32 on p15j). +- **Knobs on FCL:** `adb shell setprop debug.mobilegl.env "MOBILEGL_A=1;MOBILEGL_B=0"` (49c6394d); + `fclab.sh` takes a 6th field `K=V,K=V`. +- **MC's AFK frame limit:** `inactivityFpsLimit:"afk"` (MC 1.21.2+) made later probe windows and + profiles spin in `System.nanoTime`. `fcl_scene.sh` now sets `"minimized"` for bench scenes and + restores the original options files (`/data/local/tmp/p15-opts-121{5,4}.txt`). Profiles taken + before this are partly AFK-polluted. +- **BSL at `gpuhunt`** (CPU 2380/1689 MHz, GPU 578 MHz, all 100 % GPU busy): + - MobileGlues 53.4 fps; + - dev Magma 53.2; + - p15l Magma 51.8 (3 reps, -3.0 % vs MobileGlues: target met, -2.6 % vs dev to bisect); + - Espryt dev and p15l 48.3 (-9.6 %): the GPU gap, inherited from dev. +- **Same-session cpuhunt, apply thread:** + + | build | fps | apply ms/frame | + |---|---|---| + | MobileGlues | 329 | CPU 1.55 | + | Magma inproc p15m | 300 | 1.6 | + | Espryt inproc | 296 | 1.65-1.8 | + + - Inproc beats MobileGlues only when the apply thread's CPU is below MobileGlues' (both pay the + same queueBuffer wait). About 0.3 ms per frame beyond the apply CPU is still unexplained. + - 500b63ea: per-store reuse of renamed-away wire buffers (Magma apply -0.13 ms). + - ONE_TIME_SUBMIT: no effect (A/B'd, knob dropped). + - Magma's driver work is about 2x dev's: vkResetCommandBuffer 0.09 + vkEndCommandBuffer 0.11 + ms/frame. +- **Open user decision:** Espryt's apply thread spends 0.06 ms/frame in `LatchIfGuiltyBeforeApply` + (glGetGraphicsResetStatus is a kgsl ioctl, queried on every wake). Rate-limiting it to 2 ms + breaks `ServerLoopEglLatchTest.AGuiltyResetEndsTheSessionBeforeItsNextRecord...`, the designed + promptness guarantee, so it was reverted. Trading that guarantee for 0.06 ms is the user's call. +- **CI:** 4a8ecf9a green. 49c6394d: one job failed on a hosted runner's `apt-get update` timeout + (45 min, infrastructure); the failed job is re-run. +- **Next:** + - RenderDoc (rdc GLES layer, remote server stopped): Espryt vs MobileGlues BSL pass structure; + - S1 (client validate 0.25 ms) and S3 (backend by-handle syncs, descriptor resolve) for the CPU + floor and the inproc apply thread. + ## Status (2026-10-08) **Branch:** `p15impl` (worktree `.claude/worktrees/p15`, short path `W:/p15`), pushed to