aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/selftests
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-05-21 09:21:28 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2018-05-24 15:04:16 +0100
commit2f7e87692e0441abf27a9714991edd136e87363a (patch)
treea985728198854faad96a6cabc37378fb1039317e /drivers/gpu/drm/selftests
parentgpu: drm: vgem: Change return type to vm_fault_t (diff)
downloadlinux-dev-2f7e87692e0441abf27a9714991edd136e87363a.tar.xz
linux-dev-2f7e87692e0441abf27a9714991edd136e87363a.zip
drm/mm: Reject over-sized allocation requests early
As we keep an rbtree of available holes sorted by their size, we can very easily determine if there is any hole large enough that might satisfy the allocation request. This helps when dealing with a highly fragmented address space and a request for a search by address. To cache the largest size, we convert into the cached rbtree variant which tracks the leftmost node for us. However, currently we sorted into ascending size order so the leftmost node is the smallest, and so to make it the largest hole we need to invert our sorting. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180521082131.13744-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/selftests')
0 files changed, 0 insertions, 0 deletions