oMLX OMLX_DISABLE_PRESSURE_RECLAIM and request_pressure_reclaim scheduler path
Parent: Mac local LLMs: oMLX, Rapid-MLX and related internals · Published reference · snapshot 2026-10-05
↓ Facts as markdownall context files
Whether 5 grace polls cover a slow prefill chunk, since the chunk-boundary drain waits for the end of the current chunk.
These notes link each claim to its source. Some citations identify archived research reports that are no longer hosted on this site. A published reference means the content is available; it does not certify independent review or accuracy.Read the editorial policy and follow the sources before relying on a claim.
Facts
- Whether 5 grace polls cover a slow prefill chunk, since the chunk-boundary drain waits for the end of the current chunk. [source]
- `Scheduler` keeps `_pending_reclaim_request` for idle reclaim and `_pending_pressure_clear` for hard-pressure reclaim; the second "drains at the next step boundary even under load". [source]
- `request_pressure_reclaim` only sets `_pending_pressure_clear = True`, and its docstring says the actual `_sync_and_clear_cache` runs on the inference thread at the next `step()` boundary. [source]
- `_consume_pressure_clear` returns False when the flag is unset, otherwise resets it and returns True, and it is deliberately not idle-gated. [source]
- `has_requests()` includes `_pending_pressure_clear`, so an idle engine loop keeps calling `step()` until the clear fires. [source]
- The external prefill loop calls `_consume_pressure_clear()` after each chunk and then `Scheduler._clear_cache(self)`, because a single `step()` can last minutes. [source]
- A comment at that site says the abort escalation was measured firing 0.1 GB over the watermark with 3.7 GB pooled. [source]
- `Scheduler._clear_cache` calls `_sync_and_clear_cache(self._stream)` and records the pooled bytes for the prefill transient tracker when flat-overhead tracking is on. [source]
- `_process_pending_reclaim` returns without consuming the idle request while any request is running, prefilling or waiting, and cites issue 2179. [source]
- The enforcer's grace gate requires level not ok, not emergency, `OMLX_DISABLE_PRESSURE_RECLAIM != "1"` and fewer than `_PRESSURE_RECLAIM_GRACE_POLLS_MAX` (5) polls, and returns early after a successful request. [source]
- At hard level the enforcer calls `_request_scheduler_cache_reclaim(freed_hot)` after the hot-cache shrink unless the env var is "1", and then recomputes the pressure level from current usage. [source]
- `_request_scheduler_cache_reclaim` calls `request_pressure_reclaim` on each pooled engine's scheduler, tolerates exceptions per scheduler, and returns the count of accepted requests. [source]
Children
- No children recorded.