Skip to content

feat: Ebb Phase 2 cache trimming and pressure (0.91.4) - #17

Merged
Fi3w0 merged 5 commits into
masterfrom
feat/ebb-phase2
Oct 28, 2026
Merged

Fi3w0 merged 5 commits into
masterfrom
feat/ebb-phase2

Conversation

@Fi3w0

@Fi3w0 Fi3w0 commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

Lands the local Ebb work stacked since master (bce1b11): Wave memory sizes, Ebb Phase 1 monitoring, the packaged NVIDIA memory profile, the README showcase and Ebb Phase 2.

Phase 2 (0.91.4) adds bounded light/deep maintenance passes that free only TideWM-owned rebuildable caches out of view:

  • render.gpu cache trimming with weak hidden clocks, per-mode delays (low 30m / balanced 10m / aggressive 2m), deep-pass map shrinking and 1–10 ms pass budgets.
  • Protection for every current render placement on every output, all mapped layers, pinned and fullscreen windows; unknown visibility protects everything. Close snapshots, client buffers and live frames are never evicted.
  • Optional kernel PSI (MEMORY_PRESSURE_WATCH / cgroup memory.pressure / /proc/pressure/memory) with a sampled-availability fallback. No thread, service or dependency.
  • Caps gate cache and heap trimming together; passes defer on grabs, structural animation, camera motion and capture consumers.
  • Per-app rule { ebb = ... }, generated ebb.wave + tidectl ebb init, and tidectl ebb run [--deep].
  • Docs: Ebb reference, rule key, technical report, changelog entries, TODO status.

Verification

  • Local: 738 tests (706 compositor + 23 tidectl + 9 wavefmt), cargo fmt --check, strict Clippy all-features/all-targets and default, debug + release builds.
  • Native 0.91.4 (udev, two outputs): doctor 11/11; light/deep manual passes executed in 779/962/913 µs with heap trim releasing free pages and zero warnings.
  • Hidden-window probe: a throwaway glass-shader client moved off screen yielded zero evictions because the window owner had already released its hidden caches; Ebb protected all live caches and touched nothing visible. Test client cleaned up; windows/workspaces unchanged.
  • tidectl ebb init checked on a temp regular file and a symlinked config: backup, symlink/permissions preserved, include added once, idempotent.

Not covered

  • Real-session eviction of a surviving cache, PSI firing, screens-off passes and tidectl ebb init on the maintainer's real config.
  • Phase 3 (per-app ownership reports, shell pressure event, report watchdog) and the 24 h / 8 h-away soak.

No installed system files, services or master changed by this PR.

RAM budget

No new dependency, thread or service. Ebb retains one small record per cached surface plus weak clock entries; passes run from the existing maintenance tick under a 1–10 ms budget and allocate no per-frame state. The only transient allocation is the pass's candidate vector, which exists for the duration of one pass.

Fi3w0 added 5 commits October 28, 2026 22:22
Support decimal B/KB/MB/GB and binary KiB/MiB/GiB sizes with checked whole-byte arithmetic, variable and list lowering, and eval serialization. Document unit semantics and reject nonfinite, negative, fractional-byte and inexact-range results.

Validation: 714 tests, fmt, strict all-feature Clippy, optimized build; private nested three-engine matrix with subscribers and real clients, including size eval checks.
Sample PSS, fds, system pressure and the shared perf texture estimate at bounded configurable intervals. Keep bounded in-memory history; report growth, away growth and retained dead-resource references through stats, logs, daily toasts and ebb-warning IPC. Add tidectl ebb stats and config diagnostics.

Native idle maintenance may return already-free GNU heap pages, respecting off, grabs, animation and caps with hysteresis and blocked retries. Hidden-cache eviction and pressure passes remain later phases; NVIDIA profiling is staged only. Preserve exact whole-byte size lowering at the Lua integer boundary.

Validation: 726 locked all-feature/all-target tests, fmt, strict Clippy with all and default features, release/debug builds. Private three-engine/subscriber matrix: 61 observations, zero differences; debug/release CLI, reload and cadence checks; copied personal config validation. Native and long-run validation pending.
Ship the native-tested TideWM-only OpenGL memory-reuse profile through Arch, Gentoo, source installs and the NixOS module, retaining normal config protection and an explicit NixOS opt-out. Standalone Nix packages supply data without activating it.

Keep vendor handling in host diagnostics: inspect the selected compositor GL libraries, verify bundled profile data, and distinguish missing optional data from custom settings or explicit disabling. Bound file reads; document installation scope, activation, and rollback. No compositor or Ebb behavior changes.

Validation: 730 tests, fmt, strict Clippy with all/default features, release/debug builds; native new doctor 11/11; private nested doctor with real clients; package installation staging and shell syntax. Full distro builds and Nix evaluation not run.
Ebb Phase 2: bounded light/deep passes over rebuildable render.gpu caches,
weak hidden clocks, per-mode delays, map shrinking, caps gating cache and
heap trimming, per-app rule { ebb }, generated ebb.wave + tidectl ebb init,
manual tidectl ebb run [--deep], and optional kernel PSI pressure.

Protected: every current render placement on every output, all mapped
layers, pinned/fullscreen windows; unknown placements protect everything.
Pass budgets are 1-10ms and defer on grabs, structural animation, camera
motion and live capture consumers.

Gates: 738 tests (706+23+9), fmt, both strict Clippy variants, debug and
release builds. Not natively exercised; Phase 3 ownership reports, shell
pressure event and long soak remain open. Evidence:
.hermes/worklogs/ebb-phase2-2026-10-28/README.md
@Fi3w0 Fi3w0 changed the title Feat/ebb phase2 feat: Ebb Phase 2 cache trimming and pressure (0.91.4) Oct 28, 2026
@Fi3w0
Fi3w0 merged commit 3e19b10 into master Oct 28, 2026
1 check passed
@Fi3w0
Fi3w0 deleted the feat/ebb-phase2 branch October 28, 2026 23:17
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