Skip to content

feat(config): enable PSI for guest memory pressure signals#9

Merged
AprilNEA merged 1 commit into
masterfrom
feat/psi-config
Jul 15, 2026
Merged

feat(config): enable PSI for guest memory pressure signals#9
AprilNEA merged 1 commit into
masterfrom
feat/psi-config

Conversation

@AprilNEA

Copy link
Copy Markdown
Member

The ArcBox idle-balloon controller watches in-guest memory pressure via the agent (arcboxlabs/arcbox#390). Today the agent samples MemAvailable and workingset refault rates from /proc; with CONFIG_PSI the kernel exposes /proc/pressure/{memory,cpu,io} and event triggers, letting the agent upgrade to stall-based detection (kernel-driven wakeups instead of 1s sampling) without any RPC contract change.

Enabled on both architectures. PSI accounting overhead is negligible for VM workloads (ChromeOS/Android ship it enabled); no PSI_DEFAULT_DISABLED, so it works without cmdline changes.

Verified absent today: the 0.6.1 boot-asset kernel image contains no psimon/avg10 strings — the agent currently runs its /proc/meminfo + workingset_refault fallback.

The ArcBox idle-balloon controller watches in-guest memory pressure via
the agent (arcbox PR #390). Today the agent samples MemAvailable and
workingset refault rates; with CONFIG_PSI the kernel exposes
/proc/pressure/{memory,cpu,io} and event triggers, letting the agent
upgrade to stall-based detection without contract changes.

Enabled on both architectures. PSI accounting overhead is negligible
for VM workloads (ChromeOS/Android ship it enabled); no
PSI_DEFAULT_DISABLED so it works without cmdline changes.
@greptile-apps

greptile-apps Bot commented Jul 15, 2026

Copy link
Copy Markdown

Greptile Summary

This PR enables Linux Pressure Stall Information in both ArcBox kernel configs. The main changes are:

  • Adds CONFIG_PSI=y to the ARM64 kernel config.
  • Adds CONFIG_PSI=y to the x86_64 kernel config.
  • Allows the guest agent to use /proc/pressure stall signals for memory pressure detection.

Confidence Score: 5/5

Safe to merge with minimal risk.

The change is limited to enabling a standard kernel config option in both architecture configs. CONFIG_PROC_FS=y is already present, and no conflicting PSI_DEFAULT_DISABLED setting was found in the changed configs.

No files require special attention.

T-Rex T-Rex Logs

What T-Rex did

  • Ran the PSI configuration validation by executing the validation script and reviewing the after-state log.
  • Confirmed that arm64 and x86_64 configurations show CONFIG_PSI=y in the log.
  • Noted that CONFIG_PSI_DEFAULT_DISABLED is not present in either file.
  • Observed environment blockers: docker and aarch64-linux-gnu-gcc are not available, while make and gcc are present, limiting full validation.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
configs/arcbox-arm64.config Adds built-in CONFIG_PSI=y to the ARM64 kernel config so /proc/pressure is exposed for in-guest pressure monitoring; no issues found.
configs/arcbox-x86_64.config Adds built-in CONFIG_PSI=y to the x86_64 kernel config so /proc/pressure is exposed for in-guest pressure monitoring; no issues found.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant KernelConfig as ArcBox kernel config
participant Kernel as Built guest kernel
participant Proc as /proc/pressure/*
participant Agent as ArcBox agent

KernelConfig->>Kernel: "CONFIG_PSI=y"
Kernel->>Proc: expose memory/cpu/io PSI files
Agent->>Proc: detect pressure interface
Proc-->>Agent: pressure stall metrics and triggers
Agent->>Agent: use PSI-based balloon pressure watch
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant KernelConfig as ArcBox kernel config
participant Kernel as Built guest kernel
participant Proc as /proc/pressure/*
participant Agent as ArcBox agent

KernelConfig->>Kernel: "CONFIG_PSI=y"
Kernel->>Proc: expose memory/cpu/io PSI files
Agent->>Proc: detect pressure interface
Proc-->>Agent: pressure stall metrics and triggers
Agent->>Agent: use PSI-based balloon pressure watch
Loading

Reviews (1): Last reviewed commit: "feat(config): enable PSI for guest memor..." | Re-trigger Greptile

@AprilNEA AprilNEA merged commit f7a38f0 into master Jul 15, 2026
7 checks passed
AprilNEA added a commit to arcboxlabs/arcbox that referenced this pull request Jul 15, 2026
Boot assets 0.6.2 ships kernel v0.0.17, which enables CONFIG_PSI
(arcboxlabs/kernel#9): the guest now exposes /proc/pressure/* so the
agent's balloon pressure watch can upgrade from meminfo/refault
sampling to PSI triggers (arcbox #390 follow-up).

Also in the rebuilt assets, from boot-assets' own pipeline: manifest
now records the kernel release tag instead of 'latest', and the
firecracker/jailer binaries advertised for sandboxes move 1.10.1 ->
1.16.1 (bookkeeping in manifest.binaries; arcbox's downloader does not
consume that section - sandbox binaries are provisioned separately).
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