[Feat] (P13 W4): MG_Config::DataArmIsRecord and the W4-W6 MOBILEGL_PIPE_DATA_ARM knob

This commit is contained in:
2026-10-06 08:14:36 -04:00
parent a32ca0017d
commit 081854653a
4 changed files with 56 additions and 0 deletions
+23
View File
@@ -735,10 +735,33 @@ namespace MobileGL::MG_Config {
inline Bool ServerOwnedWindowSurfaces() {
return Transport == TransportMode::Spawn && Ipc.Surface == IpcSurface::Server;
}
// P13 W4: THE DATA-ARM QUESTION - do the backends read RECORDS (the applier's twins, the staged
// stores, the verb's own handles) rather than frontend objects? Under a wire the answer has
// always been yes; P13 makes it yes for monolith too ("monolith is the push variant"), one
// record family at a time. Each family's arm sites ask THIS rather than `Transport`, which
// keeps answering the questions that really are about the transport (lifecycle, roles, whose
// caps, whether a store copies).
//
// MOBILEGL_PIPE_DATA_ARM=record (default) | frontend picks monolith's arm for the families
// already switched. It exists for W4-W6 only - bisecting a monolith red to the switch, and
// the per-thread CPU record (ID-P13-2) - and goes in W6 with the frontend arms. Latched once
// by MG_ConfigLoader::Init(): the two arms keep their twins in different places.
extern Bool MonolithTakesRecordArm;
inline Bool DataArmIsRecord() { return Transport != TransportMode::Monolith || MonolithTakesRecordArm; }
// ...and the record arm runs in this process over stores that ALIAS the frontend's shadows
// (monolith) instead of copying them (every wire).
inline Bool RecordArmAliasesFrontend() {
return Transport == TransportMode::Monolith && MonolithTakesRecordArm;
}
#else
// The whole point: in a build without MG_Remote this folds at compile time, so
// `if (MG_Config::Transport != MG_Config::TransportMode::Monolith)` in Init.cpp is a
// discarded statement and the pull build gains no symbol, no branch and no byte.
inline constexpr TransportMode Transport = TransportMode::Monolith;
// P13 W4: a build without MG_Remote stays on the frontend arm until W5 moves the record arm
// out of the disaggregated gating (ID-P13-1 / A2).
inline constexpr Bool DataArmIsRecord() { return false; }
inline constexpr Bool RecordArmAliasesFrontend() { return false; }
#endif
} // namespace MobileGL::MG_Config