]> git.baikalelectronics.ru Git - kernel.git/commit
drm/selftests: add drm buddy pathological testcase
authorArunpravin <Arunpravin.PaneerSelvam@amd.com>
Tue, 22 Feb 2022 17:48:45 +0000 (23:18 +0530)
committerChristian König <christian.koenig@amd.com>
Wed, 23 Feb 2022 09:46:32 +0000 (10:46 +0100)
commit00647fa08447f9ae5a37eb2b2c286888adc7413b
tree022fb6192e3948dbb334c83061d84ba10d724f78
parentd7c56d6c535496198d427b02612cf5d31bcb0250
drm/selftests: add drm buddy pathological testcase

create a pot-sized mm, then allocate one of each possible
order within. This should leave the mm with exactly one
page left. Free the largest block, then whittle down again.
Eventually we will have a fully 50% fragmented mm.

v2(Matthew Auld):
  - removed unnecessary test succeeded print
  - replace list_del()/list_add_tail() with list_move_tail()

Signed-off-by: Arunpravin <Arunpravin.PaneerSelvam@amd.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Acked-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220222174845.2175-7-Arunpravin.PaneerSelvam@amd.com
Signed-off-by: Christian König <christian.koenig@amd.com>
drivers/gpu/drm/selftests/drm_buddy_selftests.h
drivers/gpu/drm/selftests/test-drm_buddy.c