]> git.baikalelectronics.ru Git - kernel.git/commit
drm/mm: add ig_frag selftest
authorNirmoy Das <nirmoy.aiemd@gmail.com>
Fri, 5 Jun 2020 09:14:02 +0000 (11:14 +0200)
committerChristian König <christian.koenig@amd.com>
Mon, 8 Jun 2020 13:14:16 +0000 (15:14 +0200)
commitdb9049d977a892516758f0478a5f5cbb552b4bec
treed1f84587cd2027172c587c466bca7beb0a0cce25
parentbce02a735e148c3710f599f05777223a6b2ff062
drm/mm: add ig_frag selftest

This patch introduces fragmentation in the address range
and measures time taken by 10k and 20k insertions. ig_frag()
will fail if the time taken by 20k insertions takes more than
4 times of 10k insertions as we know that insertions should at
most scale quadratically.

v2:
introduce fragmentation by freeing every other node.
only test bottom-up and top-down for now.

v3:
fix incorrect mode check

Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/369076/
drivers/gpu/drm/selftests/drm_mm_selftests.h
drivers/gpu/drm/selftests/test-drm_mm.c