News: 0001623118

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Intel Xe Driver Improves Memory Pressure / Out-Of-Memory Behavior For vRAM With Linux 7.1

([Intel] 3 Hours Ago Intel Xe Driver Memory Pressure)


Following the Intel Xe kernel graphics driver pull request [1]landing transparent hugepages for device pages as an SVM win, another round of Intel Xe driver updates were sent out this week ahead of next month's Linux 7.1 merge window. This latest pull request lands a new user-space API for helping the Intel Xe driver better cope with situations of video memory pressure / out-of-memory behavior for vRAM.

The headline change with this latest Intel Xe kernel driver pull request is support for purgeable buffer objects (BOs). This new user-space API provides a way for user-space to provide memory usage hints for enhancing the memory management behavior under memory pressure.

By default the behavior remains assuming that buffer objects are actively needed. But the new user-space API allows hinting that a buffer object can be "DONTNEED" for contents that are discardable and can be purged under memory pressure, if the buffer contents can be easily re-generated if needed. Or there is "PURGED" when the backing store is reclaimed during memory pressure.

This design aims to improve out-of-memory conditions and more efficient GPU memory utilization by more easily marking buffers that are preferred to be purged if under OOM conditions where they can be easily re-generated when needed or the memory pressure subsiding. Marking the buffer objects as purgeable can be done using the madvise system call.

This purgeable buffer object support for the Intel Xe kernel driver was sent to DRM-Next via [2]this pull request . Look for this new addition in the upcoming Linux 7.1 merge window for helping Intel graphics better cope with memory pressure.

Over in user-space, [3]this Mesa merge request was opened this week for adding the madvise purgeable interface support for the Intel OpenGL/Vulkan driver code path. With the kernel driver patches lining up for Linux 7.1, that Mesa support should be subsequently merged soon.



[1] https://www.phoronix.com/news/Intel-Xe-THP-For-Device-SVM

[2] https://lore.kernel.org/dri-devel/acX4fWxPkZrrfwnT@gsse-cloud1.jf.intel.com/

[3] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40573



Do what comes naturally. Seethe and fume and throw a tantrum.