Repository navigation
feat: sweep every GPU's released textures while idle - #13
Merged
Merged
Conversation
Smithay frees dropped GL textures, images and buffers only after a rendered frame, and only on the renderer that drew it. Anything released after an idle desktop's last frame waited for the next one, and render-only GPU nodes holding cross-GPU imports were never swept. The udev maintenance timer now calls GpuManager::cleanup_texture_cache at most every 5 s, skipped while the DRM device is paused. Upstream only makes a context current when its destruction queue is non-empty, so an idle GPU is not woken from runtime suspend.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
0.90.200 adds the idle
cleanup_texture_cachecall site that plan §3 deferred until after the Smithay migration.Why: Smithay frees dropped GL textures, EGL images and buffers only after a rendered frame (
GlesRenderer::cleanupon unbind, or a no-damagerender_frame), and only for the renderer that drew. That leaves two gaps:ImportBridge::cleanup_texture_cacheonly reaches the primary renderer.Change: the udev maintenance timer now calls
GpuManager::cleanup_texture_cache(upstream347b2b30).try_borrow_mut, so it can never collide with a render.79bbed5emakes a context current only when its destruction queue is non-empty, so an idle node isn't woken from runtime suspend (Smithay #2178/#2180).Validation:
.200, NVIDIA only (AMD excluded by config).Separate finding, not caused by this change: the first capture of each output grows the NVIDIA driver's
/dev/nvidiactlmapping (+44 MiB on 2560×1440), and it stays at that level. It's bounded, and the sweep can't release it. Tracked separately.