Skip to content

perf(mtlvk,jetsam,simfb): disable Lavapipe timestamps, reuse broker root textures, and tune multi-device endurance - #21

Merged
Apdelrahman1911 merged 3 commits into
mainfrom
perf/lavapipe-and-multidevice-endurance
Dec 6, 2026
Merged

Apdelrahman1911 merged 3 commits into
mainfrom
perf/lavapipe-and-multidevice-endurance

Conversation

@Apdelrahman1911

Copy link
Copy Markdown

Summary

Implements the P0 graphics throughput and 6-device endurance fixes identified from matched ABBA v7 (47602052578) and 6-device soak (47623682007, 47628176479):

  1. P0-A — Disable Vulkan GPU timestamps on software/CPU Vulkan devices (external/metal2vulkan -> 286cb8601, linux/mtlvk/src/main.rs):
    • Bumps external/metal2vulkan submodule to 286cb8601 (ios-linux/metal2vulkan#3, adding DeviceOptions::disable_timestamps).
    • Defaults o.disable_timestamps = true when gpu.kind == "cpu" (overridable via MTLVK_TIMESTAMPS=1 / 0), eliminating Lavapipe's full-device lvp_GetQueryPoolResults stall (11.88 s wall / 80.1% of gpu_end_to_handler).
  2. P0-B — Reuse BrokerPlane root Texture & default MTLVK_VRAM_TARGETS=0 on CPU (linux/mtlvk/src/conn.rs):
    • Reuses root.clone() in TEX_NEW_BUF when pixel_format, texture_type, swizzle, mipmap_level_count == 1, and array_length == 1 match the BrokerPlane root texture (preserving plane._index and Arc<BrokerPlane> lifetime while eliminating per-frame vkCreateImageView churn).
    • Defaults vram_targets = !is_cpu when MTLVK_VRAM_TARGETS is unset (overridable via MTLVK_VRAM_TARGETS=1 / 0), avoiding redundant host↔VRAM proxy copies on CPU devices where host RAM is unified.
  3. Dense Multi-Device Endurance (tools/launcher/core/src/services/jetsam.rs, host/simfb/simfb.c):
    • Exposes SCENE_SETTLE in KNOBS (X86SIM_JETSAM_SCENE_SETTLE, default 20.0) so dense multi-device soak runs don't SIGKILL a still-launching app whose first scene arrives slowly under 6-device CPU load.
    • Adds diagnosticd, kbd, mediaremoted, iconservicesagent, and cloudd to BACKGROUND_CPU (SCHED_IDLE + nice 19 only; never SIGSTOP-paused).
    • Adds SIMFB_FILE_WRITE=0 opt-out in host/simfb/simfb.c to skip periodic 2s file_from_ring() disk writes when the shared ring is active.

Verification

  • New Rust unit tests in mtlvk (main_tests, conn::tests) and x86sim_core (jetsam::tests).
  • Verified via ios-linux/x86sim ci.yml and ios-linux/ios-linux-qualification x86sim-branch-verify.yml.

@Apdelrahman1911
Apdelrahman1911 merged commit 5ef4ae5 into main Dec 6, 2026
4 checks passed
@Apdelrahman1911
Apdelrahman1911 deleted the perf/lavapipe-and-multidevice-endurance branch December 6, 2026 09:56
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.

1 participant