Skip to content

drm/suballoc: Rework the drm suballocation manager

Thomas Hellström requested to merge thomash/kernel:rework_suballoc into xe

Rework the drm suballocation manager to be a wrapper around an existing allocator (drm_mm) and to avoid using queues for freeing, thus avoiding throttling on free which is a really bad idea.

This variant is probably more cpu-hungry but can be improved at the cost of additional complexity. Ideas for that are documented in the drm_suballoc.c file.

Signed-off-by: Thomas Hellström thomas.hellstrom@linux.intel.com

v2:

  • Updated some documentation according to feedback from Matthew Brost.
  • Added a mutex to protect against starvation.
  • Use prepare_to_wait()/finish_wait() instead of wait_event() as that IMO makes it clearer what actually happens. The condition function interface previously as a bit awkward.
Edited by Thomas Hellström

Merge request reports

Loading