diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-05-21 09:21:28 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-05-24 15:04:16 +0100 |
commit | 2f7e87692e0441abf27a9714991edd136e87363a (patch) | |
tree | a985728198854faad96a6cabc37378fb1039317e /ipc | |
parent | 1d1a4f6dd1645fba6533c7884582006d13664748 (diff) | |
download | linux-2f7e87692e0441abf27a9714991edd136e87363a.tar.gz |
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 'ipc')
0 files changed, 0 insertions, 0 deletions