[Intel-gfx] [PATCH v6] drm: Optimise for continuous memory allocation

2022-12-17 Thread xinhui pan
. Signed-off-by: xinhui pan --- change from v5: reworked --- drivers/gpu/drm/drm_buddy.c | 161 ++-- 1 file changed, 154 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm/drm_buddy.c index 11bb59399471..6c795e1b3247 100644 --- a

[Intel-gfx] [PATCH v5] drm: Optimise for continuous memory allocation

2022-12-01 Thread xinhui pan
+1 or 0+1+2+0 or 0+2+1+0. Without this patch, eviction is the final step to cleanup memory. Now there is a chance to delay the evction and then reduce the total count of evction. Signed-off-by: xinhui pan --- change from v4: Fix offset check by using <= instead of < Change patch descr

[Intel-gfx] [PATCH v4] drm: Optimise for continuous memory allocation

2022-12-01 Thread xinhui pan
this patch aims to implement the rest cases. Adding a new member leaf_link which links all leaf blocks in asceding order. Now we can find more than 2 sub-order blocks easier. Say, order 4 can be combined with corresponding order 4, 2+2, 1+2+1, 0+1+2+0, 0+2+1+0. Signed-off-by: xinhui pan